From 760787858a991c8e8ccad6ae18fdd835c06e8436 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 21 Apr 2021 19:42:37 +0200 Subject: [PATCH] bsc: disable hardening in some packages --- bsc/babeltrace2/default.nix | 1 + bsc/extrae/default.nix | 1 + bsc/llvm-ompss2/clang.nix | 4 +++- bsc/lmbench/default.nix | 2 +- bsc/mpich/default.nix | 1 + bsc/openmpi/default.nix | 2 ++ bsc/osu/default.nix | 1 + bsc/tampi/default.nix | 2 ++ bsc/tampi/git.nix | 1 + overlay.nix | 2 ++ 10 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bsc/babeltrace2/default.nix b/bsc/babeltrace2/default.nix index 344e580..43ae45c 100644 --- a/bsc/babeltrace2/default.nix +++ b/bsc/babeltrace2/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ glib libuuid popt elfutils python3 swig4 ncurses breakpointHook ]; + hardeningDisable = [ "all" ]; configureFlags = [ "--enable-python-plugins" diff --git a/bsc/extrae/default.nix b/bsc/extrae/default.nix index 5e95544..1519a45 100644 --- a/bsc/extrae/default.nix +++ b/bsc/extrae/default.nix @@ -34,6 +34,7 @@ stdenv.mkDerivation rec { patches = [ ./use-command.patch ]; enableParallelBuilding = true; + hardeningDisable = [ "all" ]; nativeBuildInputs = [ installShellFiles ]; diff --git a/bsc/llvm-ompss2/clang.nix b/bsc/llvm-ompss2/clang.nix index 97ec345..9afb3d3 100644 --- a/bsc/llvm-ompss2/clang.nix +++ b/bsc/llvm-ompss2/clang.nix @@ -49,7 +49,9 @@ stdenv.mkDerivation rec { # Error with -D_FORTIFY_SOURCE=2, see https://bugs.gentoo.org/636604: # /build/source/compiler-rt/lib/tsan/dd/dd_interceptors.cpp:225:20: # error: redefinition of 'realpath' - hardeningDisable = [ "fortify" ]; + # Requires disabling the "fortify" set of flags, however, for performance we + # disable all: + hardeningDisable = [ "all" ]; cmakeBuildType = if enableDebug then "Debug" else "Release"; diff --git a/bsc/lmbench/default.nix b/bsc/lmbench/default.nix index 0c847c4..c86c222 100644 --- a/bsc/lmbench/default.nix +++ b/bsc/lmbench/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { sed -i "s@/bin/rm@rm@g" $(find . -name Makefile) ''; - hardeningDisable = [ "format" ]; + hardeningDisable = [ "all" ]; enableParallelBuilding = false; diff --git a/bsc/mpich/default.nix b/bsc/mpich/default.nix index 3f174c4..87abe12 100644 --- a/bsc/mpich/default.nix +++ b/bsc/mpich/default.nix @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; buildInputs = [ perl gfortran openssh hwloc libfabric ]; + hardeningDisable = [ "all" ]; # doCheck = true; # Fails diff --git a/bsc/openmpi/default.nix b/bsc/openmpi/default.nix index 5787d8e..093eb9a 100644 --- a/bsc/openmpi/default.nix +++ b/bsc/openmpi/default.nix @@ -76,6 +76,8 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; + hardeningDisable = [ "all" ]; + postInstall = '' rm -f $out/lib/*.la ''; diff --git a/bsc/osu/default.nix b/bsc/osu/default.nix index af91d81..539a4c0 100644 --- a/bsc/osu/default.nix +++ b/bsc/osu/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { doCheck = true; enableParallelBuilding = true; buildInputs = [ mpi ]; + hardeningDisable = [ "all" ]; configureFlags = [ "CC=${mpi}/bin/mpicc" "CXX=${mpi}/bin/mpicxx" diff --git a/bsc/tampi/default.nix b/bsc/tampi/default.nix index e6160ca..f690874 100644 --- a/bsc/tampi/default.nix +++ b/bsc/tampi/default.nix @@ -24,4 +24,6 @@ stdenv.mkDerivation rec { rev = "6b11368ea522cd7095cfcf163831b8285faeee7e"; sha256 = "0519lb1rinhzkk0iy5cjjiqnk1bzhnnzhfigj9ac2c3wl0zcsrvy"; }; + + hardeningDisable = [ "all" ]; } diff --git a/bsc/tampi/git.nix b/bsc/tampi/git.nix index c94fcee..cb1378e 100644 --- a/bsc/tampi/git.nix +++ b/bsc/tampi/git.nix @@ -22,4 +22,5 @@ stdenv.mkDerivation rec { url = "ssh://git@bscpm03.bsc.es/interoperability/tampi"; ref = "master"; }; + hardeningDisable = [ "all" ]; } diff --git a/overlay.nix b/overlay.nix index 083b47a..fdf4849 100644 --- a/overlay.nix +++ b/overlay.nix @@ -93,6 +93,8 @@ let "--with-jemalloc-prefix=nanos6_je_" "--enable-stats" ]; + + hardeningDisable = [ "all" ]; }); # =================================================================