From 6648b04381b8fefb704824f5db898813f22dafbb Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 25 May 2016 19:36:50 +0200 Subject: [PATCH 1/2] stdenv: fix paxmark On Linux, paxctl's setup hook should overwrite the paxmark stub, but the stub is defined after the setup hooks are sourced, so the stub ends up overwriting the real function. The result is that paxmark fails to do anything. The fix is to define the stub before any setup hooks are sourced. Thanks to @vcunat for figuring this out. Closes #15492 --- pkgs/stdenv/generic/setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index ce5feac3c66d..85e74461d2a4 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -236,6 +236,11 @@ BASH="$SHELL" export CONFIG_SHELL="$SHELL" +# Dummy implementation of the paxmark function. On Linux, this is +# overwritten by paxctl's setup hook. +paxmark() { true; } + + # Execute the pre-hook. if [ -z "$shell" ]; then export shell=$SHELL; fi runHook preHook @@ -369,11 +374,6 @@ fi export NIX_BUILD_CORES -# Dummy implementation of the paxmark function. On Linux, this is -# overwritten by paxctl's setup hook. -paxmark() { true; } - - # Prevent OpenSSL-based applications from using certificates in # /etc/ssl. if [ -z "$SSL_CERT_FILE" ]; then From 2fe8a98244031a8d7b18c854da8dcb11a901cfeb Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 28 May 2016 19:43:27 +0200 Subject: [PATCH 2/2] llvm: remove bogus paxmarks Refers to non-existent files; see e.g., https://hydra.nixos.org/build/36359717/nixlog/1/raw Likely a copy-paste error that has gone unnoticed because paxmark didn't do anything, but breaks after 6648b04381b8fefb704824f5db898813f22dafbb --- pkgs/development/compilers/llvm/3.6/llvm.nix | 4 ---- pkgs/development/compilers/llvm/3.7/llvm.nix | 4 ---- pkgs/development/compilers/llvm/3.8/llvm.nix | 4 ---- 3 files changed, 12 deletions(-) diff --git a/pkgs/development/compilers/llvm/3.6/llvm.nix b/pkgs/development/compilers/llvm/3.6/llvm.nix index 5941d7883565..54de4b200f30 100644 --- a/pkgs/development/compilers/llvm/3.6/llvm.nix +++ b/pkgs/development/compilers/llvm/3.6/llvm.nix @@ -57,10 +57,6 @@ in stdenv.mkDerivation rec { rm -fR $out paxmark m bin/{lli,llvm-rtdyld} - - paxmark m unittests/ExecutionEngine/JIT/JITTests - paxmark m unittests/ExecutionEngine/MCJIT/MCJITTests - paxmark m unittests/Support/SupportTests ''; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix index 3a7829eca6df..cc65c69927c5 100644 --- a/pkgs/development/compilers/llvm/3.7/llvm.nix +++ b/pkgs/development/compilers/llvm/3.7/llvm.nix @@ -62,10 +62,6 @@ in stdenv.mkDerivation rec { rm -fR $out paxmark m bin/{lli,llvm-rtdyld} - - paxmark m unittests/ExecutionEngine/JIT/JITTests - paxmark m unittests/ExecutionEngine/MCJIT/MCJITTests - paxmark m unittests/Support/SupportTests ''; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix index ef929dec68ba..fb8266480326 100644 --- a/pkgs/development/compilers/llvm/3.8/llvm.nix +++ b/pkgs/development/compilers/llvm/3.8/llvm.nix @@ -67,10 +67,6 @@ in stdenv.mkDerivation rec { rm -fR $out paxmark m bin/{lli,llvm-rtdyld} - - paxmark m unittests/ExecutionEngine/JIT/JITTests - paxmark m unittests/ExecutionEngine/MCJIT/MCJITTests - paxmark m unittests/Support/SupportTests ''; enableParallelBuilding = true;