From b39dd890acdef42e944a9cb9184fe63331dfbb3c Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Mon, 14 Dec 2020 20:53:00 +0100 Subject: tests.cc-wrapper: disable static compilation macOS macOS does not support this --- pkgs/test/cc-wrapper/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'pkgs/test') 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 -- cgit 1.4.1