summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2021-05-22 13:55:47 +0200
committerJörg Thalheim <joerg@thalheim.io>2021-05-23 17:38:17 +0000
commit166948d4794be5c56c6279bf580ac416b1bcf022 (patch)
treeaaad77fbf9922aa9fe767c638e4c41b06088b3d3 /pkgs/test
parent61c74e1aee1b7fb35ca3c550f57286cf85999e96 (diff)
downloadnixpkgs-166948d4794be5c56c6279bf580ac416b1bcf022.tar
nixpkgs-166948d4794be5c56c6279bf580ac416b1bcf022.tar.gz
nixpkgs-166948d4794be5c56c6279bf580ac416b1bcf022.tar.bz2
nixpkgs-166948d4794be5c56c6279bf580ac416b1bcf022.tar.lz
nixpkgs-166948d4794be5c56c6279bf580ac416b1bcf022.tar.xz
nixpkgs-166948d4794be5c56c6279bf580ac416b1bcf022.tar.zst
nixpkgs-166948d4794be5c56c6279bf580ac416b1bcf022.zip
cc-wrapper: don't set rpath on static-pie executables
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/cc-wrapper/default.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix
index d82ba296e2f..b483372dea0 100644
--- a/pkgs/test/cc-wrapper/default.nix
+++ b/pkgs/test/cc-wrapper/default.nix
@@ -35,8 +35,7 @@ in stdenv.mkDerivation {
       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.
-      ${lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.cc.isGNU) ''
+      ${lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "8.0.0") ''
         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