summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2020-12-21 22:20:42 +0100
committerVladimír Čunát <v@cunat.cz>2020-12-21 22:27:48 +0100
commit363175cd99a14fd13f6019e8049271d2d65b7151 (patch)
tree35fd4b8cf021649c12300384eb9f228909e6772e /pkgs/test
parentbf444739ec4fae170fa7fc3fdaa201a914000b03 (diff)
downloadnixpkgs-363175cd99a14fd13f6019e8049271d2d65b7151.tar
nixpkgs-363175cd99a14fd13f6019e8049271d2d65b7151.tar.gz
nixpkgs-363175cd99a14fd13f6019e8049271d2d65b7151.tar.bz2
nixpkgs-363175cd99a14fd13f6019e8049271d2d65b7151.tar.lz
nixpkgs-363175cd99a14fd13f6019e8049271d2d65b7151.tar.xz
nixpkgs-363175cd99a14fd13f6019e8049271d2d65b7151.tar.zst
nixpkgs-363175cd99a14fd13f6019e8049271d2d65b7151.zip
Revert "bintools-wrapper: skip dynamic linker for static binaries"
This reverts commit ccfd26ef14ea213320f0b49db3fb347785b38f06.

These toolchain changes are too problematic, so reverting for now; see
https://github.com/NixOS/nixpkgs/pull/107086#issuecomment-749196366
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/cc-wrapper/default.nix23
1 files changed, 4 insertions, 19 deletions
diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix
index fae3448c44c..c0c89d63fff 100644
--- a/pkgs/test/cc-wrapper/default.nix
+++ b/pkgs/test/cc-wrapper/default.nix
@@ -1,13 +1,11 @@
-{ stdenv, glibc }:
+{ stdenv }:
 with stdenv.lib;
 let
   # Sanitizers are not supported on Darwin.
   # Sanitizer headers aren't available in older libc++ stdenvs due to a bug
-  sanitizersWorking = !stdenv.hostPlatform.isMusl && (
-    (stdenv.cc.isClang && versionAtLeast (getVersion stdenv.cc.name) "5.0.0")
-    || (stdenv.cc.isGNU && stdenv.isLinux)
-  );
-  staticLibc = optionalString (stdenv.hostPlatform.libc == "glibc") "-L ${glibc.static}/lib";
+  sanitizersWorking =
+       (stdenv.cc.isClang && versionAtLeast (getVersion stdenv.cc.name) "5.0.0")
+    || (stdenv.cc.isGNU && stdenv.isLinux);
 in stdenv.mkDerivation {
   name = "cc-wrapper-test";
 
@@ -30,19 +28,6 @@ in stdenv.mkDerivation {
       ./core-foundation-check
     ''}
 
-
-    ${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
     mkdir -p foo/include
     cp ${./foo.c} foo/include/foo.h