mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
cc-wrapper: don't add broken cflags to clang
On non-GNU (gcc) compilers, there is no "/lib/gcc/..." so when this is eventually expanded this is empty resulting in an incomplete "-idirafter " that eats the next argument: -idirafter -B/nix/store/wamjwwdvkmhbf4f2902nhw8jxxzv0hy3-clang-wrapper-4.0.1/bin/
This commit is contained in:
parent
64f945efd2
commit
115bf9d2cf
1 changed files with 1 additions and 1 deletions
|
@ -264,7 +264,7 @@ stdenv.mkDerivation {
|
||||||
# compile, because it uses "#include_next <limits.h>" to find the
|
# compile, because it uses "#include_next <limits.h>" to find the
|
||||||
# limits.h file in ../includes-fixed. To remedy the problem,
|
# limits.h file in ../includes-fixed. To remedy the problem,
|
||||||
# another -idirafter is necessary to add that directory again.
|
# another -idirafter is necessary to add that directory again.
|
||||||
echo "-B${libc_lib}/lib/ -idirafter ${libc_dev}/include -idirafter ${cc}/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
|
echo "-B${libc_lib}/lib/ -idirafter ${libc_dev}/include ${optionalString isGNU "-idirafter ${cc}/lib/gcc/*/*/include-fixed"}" > $out/nix-support/libc-cflags
|
||||||
|
|
||||||
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
|
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue