From 2c0c7045c9f29cb243ff7a4ef7f64f3187eeb8d9 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 20 Apr 2025 18:58:52 +0100 Subject: [PATCH] tests.hardeningFlags: enable fortifyExplicitEnabledExecTest for clang/glibc this appears to work now --- pkgs/test/cc-wrapper/hardening.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/test/cc-wrapper/hardening.nix b/pkgs/test/cc-wrapper/hardening.nix index eb5074e07d43..4bb304e4b49e 100644 --- a/pkgs/test/cc-wrapper/hardening.nix +++ b/pkgs/test/cc-wrapper/hardening.nix @@ -281,16 +281,13 @@ nameDrvAfterAttrName ( ); # musl implementation is effectively FORTIFY_SOURCE=1-only, - # clang-on-glibc also only appears to support FORTIFY_SOURCE=1 (!) - fortifyExplicitEnabledExecTest = - brokenIf (stdenv.hostPlatform.isMusl || (stdenv.cc.isClang && stdenv.hostPlatform.libc == "glibc")) - ( - fortifyExecTest ( - f2exampleWithStdEnv stdenv { - hardeningEnable = [ "fortify" ]; - } - ) - ); + fortifyExplicitEnabledExecTest = brokenIf stdenv.hostPlatform.isMusl ( + fortifyExecTest ( + f2exampleWithStdEnv stdenv { + hardeningEnable = [ "fortify" ]; + } + ) + ); fortify3ExplicitEnabled = brokenIf (!stdenv.cc.isGNU || lib.versionOlder stdenv.cc.version "12") ( checkTestBin