From 115bf9d2cfae7400f4d69dc7fa02216a2c09ca32 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 30 Nov 2017 13:43:38 -0600 Subject: 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/ --- pkgs/build-support/cc-wrapper/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index b79697b33f0c..b809591fbc82 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -264,7 +264,7 @@ stdenv.mkDerivation { # compile, because it uses "#include_next " 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 -- cgit 1.4.1