diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-04-19 12:01:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 12:01:41 +0000 |
commit | 183a214e9e4d9e253165b9d0b98db0891163fa67 (patch) | |
tree | 13d977cf22ac863f3c6097695ce6785a4e230492 /pkgs/build-support | |
parent | 3083d2abe37408a713f325d901e1f3e01edc8f66 (diff) | |
parent | 11b87cbe5984013635d05c44e9908d12339470d6 (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 13 | ||||
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 15 | ||||
-rw-r--r-- | pkgs/build-support/expand-response-params/default.nix | 16 |
3 files changed, 30 insertions, 14 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 3c553f181f0dd..5ca5bc3f5eb3b 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -8,7 +8,8 @@ { name ? "" , lib , stdenvNoCC -, bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null +, runtimeShell +, bintools ? null, libc ? null, coreutils ? null, gnugrep ? null , netbsd ? null, netbsdCross ? null , sharedLibraryLoader ? if libc == null then @@ -28,7 +29,7 @@ , isGNU ? bintools.isGNU or false , isLLVM ? bintools.isLLVM or false , isCCTools ? bintools.isCCTools or false -, buildPackages ? {} +, expand-response-params , targetPackages ? {} , useMacosReexportHack ? false , wrapGas ? false @@ -131,10 +132,6 @@ let else if hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" else ""; - expand-response-params = - optionalString (buildPackages ? stdenv && buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null") - (import ../expand-response-params { inherit (buildPackages) stdenv; }); - in stdenvNoCC.mkDerivation { @@ -418,8 +415,10 @@ stdenvNoCC.mkDerivation { env = { # for substitution in utils.bash + # TODO(@sternenseemann): invent something cleaner than passing in "" in case of absence expandResponseParams = "${expand-response-params}/bin/expand-response-params"; - shell = getBin shell + shell.shellPath or ""; + # TODO(@sternenseemann): rename env var via stdenv rebuild + shell = (getBin runtimeShell + runtimeShell.shellPath or ""); gnugrep_bin = optionalString (!nativeTools) gnugrep; wrapperName = "BINTOOLS_WRAPPER"; inherit dynamicLinker targetPrefix suffixSalt coreutils_bin; diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 11ae9868ce016..4adc1dcb1f8d8 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -8,14 +8,15 @@ { name ? "" , lib , stdenvNoCC -, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell +, runtimeShell +, cc ? null, libc ? null, bintools, coreutils ? null , zlib ? null , nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" , propagateDoc ? cc != null && cc ? man , extraTools ? [], extraPackages ? [], extraBuildCommands ? "" , nixSupport ? {} , isGNU ? false, isClang ? cc.isClang or false, isCcache ? cc.isCcache or false, gnugrep ? null -, buildPackages ? {} +, expand-response-params , libcxx ? null # Whether or not to add `-B` and `-L` to `nix-support/cc-{c,ld}flags` @@ -112,9 +113,6 @@ let # unstable implementation detail, however. suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; - expand-response-params = - optionalString ((buildPackages.stdenv.hasCC or false) && buildPackages.stdenv.cc != "/dev/null") (import ../expand-response-params { inherit (buildPackages) stdenv; }); - useGccForLibs = useCcForLibs && libcxx == null && !targetPlatform.isDarwin @@ -297,6 +295,9 @@ stdenvNoCC.mkDerivation { '(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)})) ''; + # Expose expand-response-params we are /actually/ using. In stdenv + # bootstrapping, expand-response-params usually comes from an earlier stage, + # so it is important to expose this for reference checking. inherit expand-response-params; inherit nixSupport; @@ -738,8 +739,10 @@ stdenvNoCC.mkDerivation { inherit isClang; # for substitution in utils.bash + # TODO(@sternenseemann): invent something cleaner than passing in "" in case of absence expandResponseParams = "${expand-response-params}/bin/expand-response-params"; - shell = getBin shell + shell.shellPath or ""; + # TODO(@sternenseemann): rename env var via stdenv rebuild + shell = getBin runtimeShell + runtimeShell.shellPath or ""; gnugrep_bin = optionalString (!nativeTools) gnugrep; # stdenv.cc.cc should not be null and we have nothing better for now. # if the native impure bootstrap is gotten rid of this can become `inherit cc;` again. diff --git a/pkgs/build-support/expand-response-params/default.nix b/pkgs/build-support/expand-response-params/default.nix index 7ce15e98c8d99..6868ab97d8964 100644 --- a/pkgs/build-support/expand-response-params/default.nix +++ b/pkgs/build-support/expand-response-params/default.nix @@ -1,4 +1,4 @@ -{ stdenv }: +{ stdenv, lib }: # A "response file" is a sequence of arguments that is passed via a # file, rather than via argv[]. @@ -25,4 +25,18 @@ stdenv.mkDerivation { mkdir -p $prefix/bin mv expand-response-params $prefix/bin/ ''; + + meta = { + description = "Internal tool used by the nixpkgs wrapper scripts for processing response files"; + longDescription = '' + expand-response-params is a tool that allows for obtaining a full list of all + arguments passed in a given compiler command line including those passed via + so-called response files. The nixpkgs wrapper scripts for bintools and C + compilers use it for processing compiler flags. As it is developed in + conjunction with the nixpkgs wrapper scripts, it should be considered as + unstable and subject to change. + ''; + license = lib.licenses.mit; + platforms = lib.platforms.all; + }; } |