Skip to content

Commit

Permalink
Merge pull request #106925 from Mic92/fix-darwin
Browse files Browse the repository at this point in the history
tests.cc-wrapper: disable static compilation macOS
  • Loading branch information
Mic92 committed Dec 15, 2020
2 parents f8d9426 + b39dd89 commit 2076311
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pkgs/test/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2076311

Please sign in to comment.