diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-12-02 13:41:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-02 13:41:28 -0500 |
commit | 162a935d3cc91f2b19031e262ef2e639b0fe36dd (patch) | |
tree | 292977321abd341b4f57a3789fd9050454feb9da | |
parent | 3a53ef08f1affb8905e50da7602af17cd99594eb (diff) | |
parent | 5f589d8d5de328e6831188c44b26f0ad17fe4ea0 (diff) | |
download | nixlib-162a935d3cc91f2b19031e262ef2e639b0fe36dd.tar nixlib-162a935d3cc91f2b19031e262ef2e639b0fe36dd.tar.gz nixlib-162a935d3cc91f2b19031e262ef2e639b0fe36dd.tar.bz2 nixlib-162a935d3cc91f2b19031e262ef2e639b0fe36dd.tar.lz nixlib-162a935d3cc91f2b19031e262ef2e639b0fe36dd.tar.xz nixlib-162a935d3cc91f2b19031e262ef2e639b0fe36dd.tar.zst nixlib-162a935d3cc91f2b19031e262ef2e639b0fe36dd.zip |
Merge pull request #74226 from bhpdt/fix/idirafter-stdenv
stdenv: Fix gcc -idirafter shell glob in cc-wrapper
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 757985e07161..151313847e40 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -237,7 +237,7 @@ stdenv.mkDerivation { fi '' - + optionalString (libc != null) '' + + optionalString (libc != null) ('' ## ## General libc support ## @@ -253,11 +253,17 @@ stdenv.mkDerivation { # compile, because it uses "#include_next <limits.h>" to find the # limits.h file in ../includes-fixed. To remedy the problem, # another -idirafter is necessary to add that directory again. - echo "-B${libc_lib}${libc.libdir or "/lib/"} -idirafter ${libc_dev}${libc.incdir or "/include"} ${optionalString isGNU "-idirafter ${cc}/lib/gcc/*/*/include-fixed"}" > $out/nix-support/libc-cflags + echo "-B${libc_lib}${libc.libdir or "/lib/"}" >> $out/nix-support/libc-cflags + echo "-idirafter ${libc_dev}${libc.incdir or "/include"}" >> $out/nix-support/libc-cflags + '' + optionalString isGNU '' + for dir in "${cc}"/lib/gcc/*/*/include-fixed; do + echo '-idirafter' ''${dir} >> $out/nix-support/libc-cflags + done + '' + '' echo "${libc_lib}" > $out/nix-support/orig-libc echo "${libc_dev}" > $out/nix-support/orig-libc-dev - '' + '') + optionalString (!nativeTools) '' ## |