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
@ -264,7 +264,7 @@ 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}/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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user