mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge pull request #74226 from bhpdt/fix/idirafter-stdenv
stdenv: Fix gcc -idirafter shell glob in cc-wrapper
This commit is contained in:
commit
162a935d3c
@ -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) ''
|
||||
##
|
||||
|
Loading…
Reference in New Issue
Block a user