diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2020-12-14 20:53:00 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2020-12-14 20:53:00 +0100 |
commit | b39dd890acdef42e944a9cb9184fe63331dfbb3c (patch) | |
tree | 3c326f5066c5833ca6c6cecf72715f29e120a17b /pkgs/test | |
parent | 7a06f5dd59a0c05568621be3afb0f57df2f696f1 (diff) | |
download | nixlib-b39dd890acdef42e944a9cb9184fe63331dfbb3c.tar nixlib-b39dd890acdef42e944a9cb9184fe63331dfbb3c.tar.gz nixlib-b39dd890acdef42e944a9cb9184fe63331dfbb3c.tar.bz2 nixlib-b39dd890acdef42e944a9cb9184fe63331dfbb3c.tar.lz nixlib-b39dd890acdef42e944a9cb9184fe63331dfbb3c.tar.xz nixlib-b39dd890acdef42e944a9cb9184fe63331dfbb3c.tar.zst nixlib-b39dd890acdef42e944a9cb9184fe63331dfbb3c.zip |
tests.cc-wrapper: disable static compilation macOS
macOS does not support this
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/cc-wrapper/default.nix | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix index 141a5320ef53..fae3448c44c6 100644 --- a/pkgs/test/cc-wrapper/default.nix +++ b/pkgs/test/cc-wrapper/default.nix @@ -30,14 +30,17 @@ in stdenv.mkDerivation { ./core-foundation-check ''} - printf "checking whether compiler builds valid static C binaries... " >&2 - $CC ${staticLibc} -static -o cc-static ${./cc-main.c} - ./cc-static - # our glibc does not have pie enabled yet. - ${optionalString (stdenv.hostPlatform.isMusl && stdenv.cc.isGNU) '' - printf "checking whether compiler builds valid static pie C binaries... " >&2 - $CC ${staticLibc} -static-pie -o cc-static-pie ${./cc-main.c} - ./cc-static-pie + + ${optionalString (!stdenv.isDarwin) '' + printf "checking whether compiler builds valid static C binaries... " >&2 + $CC ${staticLibc} -static -o cc-static ${./cc-main.c} + ./cc-static + # our glibc does not have pie enabled yet. + ${optionalString (stdenv.hostPlatform.isMusl && stdenv.cc.isGNU) '' + printf "checking whether compiler builds valid static pie C binaries... " >&2 + $CC ${staticLibc} -static-pie -o cc-static-pie ${./cc-main.c} + ./cc-static-pie + ''} ''} printf "checking whether compiler uses NIX_CFLAGS_COMPILE... " >&2 |