mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 01:33:11 +01:00
treewide: remove usages of obsolete pie hardening flag (#449771)
This commit is contained in:
commit
eda556d94b
|
|
@ -32,10 +32,6 @@ stdenv.mkDerivation rec {
|
||||||
faust2lv2
|
faust2lv2
|
||||||
];
|
];
|
||||||
|
|
||||||
# ld: crtbegin.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
|
|
||||||
# ld: failed to set dynamic section sizes: bad value
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,6 @@ stdenv.mkDerivation rec {
|
||||||
++ lib.concatMap (p: p.buildInputs) enabledPlugins
|
++ lib.concatMap (p: p.buildInputs) enabledPlugins
|
||||||
++ extraBuildInputs;
|
++ extraBuildInputs;
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE =
|
env.NIX_CFLAGS_COMPILE =
|
||||||
"-I${python}/include/${python.libPrefix}"
|
"-I${python}/include/${python.libPrefix}"
|
||||||
# Fix '_res_9_init: undefined symbol' error
|
# Fix '_res_9_init: undefined symbol' error
|
||||||
|
|
|
||||||
|
|
@ -150,9 +150,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
# Linking fails without this
|
# Linking fails without this
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
# Pie needs to be enabled or else it segfaults
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
# mirror 2ship's stb
|
# mirror 2ship's stb
|
||||||
mkdir stb
|
mkdir stb
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ stdenv.mkDerivation {
|
||||||
hash = "sha256-rRJrtCcgfbqC/4qQiTVeUUcPqoJlNfitYRqIO58AmpA=";
|
hash = "sha256-rRJrtCcgfbqC/4qQiTVeUUcPqoJlNfitYRqIO58AmpA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
# pipe2() is only exposed with _GNU_SOURCE
|
# pipe2() is only exposed with _GNU_SOURCE
|
||||||
# Upstream makefile explicitly uses -O3 to improve SHA-3 performance
|
# Upstream makefile explicitly uses -O3 to improve SHA-3 performance
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,6 @@ stdenv.mkDerivation rec {
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
inherit (nixosTests) chrony chrony-ptp;
|
inherit (nixosTests) chrony chrony-ptp;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,6 @@ stdenv.mkDerivation rec {
|
||||||
"PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config"
|
"PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config"
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
postBuild = lib.optionalString stdenv.hostPlatform.isLinux ''
|
postBuild = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
make -C contrib/lease-tools
|
make -C contrib/lease-tools
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,6 @@ stdenv.mkDerivation rec {
|
||||||
bash
|
bash
|
||||||
];
|
];
|
||||||
|
|
||||||
# ld: /nix/store/*-gcc-14-20241116/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/crtbegin.o:
|
|
||||||
# relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ stdenv.mkDerivation rec {
|
||||||
libopus
|
libopus
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Server software for streaming multimedia";
|
description = "Server software for streaming multimedia";
|
||||||
mainProgram = "icecast";
|
mainProgram = "icecast";
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
"DESTROOT=$(out)"
|
"DESTROOT=$(out)"
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
unpackCmd = ''
|
unpackCmd = ''
|
||||||
mkdir cron
|
mkdir cron
|
||||||
pushd cron
|
pushd cron
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ stdenv.mkDerivation rec {
|
||||||
"format"
|
"format"
|
||||||
"pic"
|
"pic"
|
||||||
"relro"
|
"relro"
|
||||||
"pie"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Prevent kexec-tools from using uname to detect target, which is wrong in
|
# Prevent kexec-tools from using uname to detect target, which is wrong in
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
|
|
||||||
# darwin currently lacks a pure `pgrep` which is extensively used here
|
# darwin currently lacks a pure `pgrep` which is extensively used here
|
||||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,6 @@ stdenv.mkDerivation rec {
|
||||||
# Note: tcmalloc and mimalloc are also supported (and normal malloc)
|
# Note: tcmalloc and mimalloc are also supported (and normal malloc)
|
||||||
cmakeFlags = lib.optional enableJemalloc "-DUSE_ALTERNATIVE_MALLOC=jemalloc";
|
cmakeFlags = lib.optional enableJemalloc "-DUSE_ALTERNATIVE_MALLOC=jemalloc";
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isMusl "pie";
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Lightweight high-performance multi-threaded web server";
|
description = "Lightweight high-performance multi-threaded web server";
|
||||||
mainProgram = "lwan";
|
mainProgram = "lwan";
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-default-colors"
|
"--enable-default-colors"
|
||||||
"--enable-widec"
|
"--enable-widec"
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,6 @@ stdenv.mkDerivation rec {
|
||||||
libevent
|
libevent
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = toString (
|
env.NIX_CFLAGS_COMPILE = toString (
|
||||||
[ "-Wno-error=deprecated-declarations" ] ++ lib.optional stdenv.hostPlatform.isDarwin "-Wno-error"
|
[ "-Wno-error=deprecated-declarations" ] ++ lib.optional stdenv.hostPlatform.isDarwin "-Wno-error"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,6 @@ buildGoModule rec {
|
||||||
|
|
||||||
buildInputs = lib.optional stdenv.hostPlatform.isLinux libX11;
|
buildInputs = lib.optional stdenv.hostPlatform.isLinux libX11;
|
||||||
|
|
||||||
hardeningEnabled = [ "pie" ];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Automated WireGuard® Management Client";
|
description = "Automated WireGuard® Management Client";
|
||||||
mainProgram = "netclient";
|
mainProgram = "netclient";
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ stdenv.mkDerivation rec {
|
||||||
libcap
|
libcap
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm -rf $out/share/doc
|
rm -rf $out/share/doc
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,6 @@ stdenv.mkDerivation rec {
|
||||||
++ lib.optional withTLSRPT libtlsrpt;
|
++ lib.optional withTLSRPT libtlsrpt;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./postfix-script-shell.patch
|
./postfix-script-shell.patch
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
]
|
]
|
||||||
++ lib.optional gamemodeSupport gamemode;
|
++ lib.optional gamemodeSupport gamemode;
|
||||||
|
|
||||||
hardeningEnable = lib.optionals stdenv.hostPlatform.isLinux [ "pie" ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
# downstream branding
|
# downstream branding
|
||||||
(lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")
|
(lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]);
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]);
|
||||||
|
|
||||||
# darwin currently lacks a pure `pgrep` which is extensively used here
|
# darwin currently lacks a pure `pgrep` which is extensively used here
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
|
|
||||||
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isFreeBSD "-lexecinfo";
|
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isFreeBSD "-lexecinfo";
|
||||||
|
|
||||||
# darwin currently lacks a pure `pgrep` which is extensively used here
|
# darwin currently lacks a pure `pgrep` which is extensively used here
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,6 @@ stdenv.mkDerivation rec {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# ${src}/support/cpp/gcc/Makefile.in states:
|
|
||||||
# We don't want to compile the compilers with -fPIE, it make PCH fail.
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://sdcc.sourceforge.net/";
|
homepage = "https://sdcc.sourceforge.net/";
|
||||||
description = "Small Device C Compiler";
|
description = "Small Device C Compiler";
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"fortify"
|
"fortify"
|
||||||
"pic"
|
"pic"
|
||||||
"pie" # ld: warning: creating DT_TEXTREL in a PIE (and more)
|
|
||||||
"stackprotector"
|
"stackprotector"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@ stdenv.mkDerivation {
|
||||||
sha256 = "1sj7a77isc2jmh7gw2naw9l9366kjx6jb909h7spj7daxdwvji8f";
|
sha256 = "1sj7a77isc2jmh7gw2naw9l9366kjx6jb909h7spj7daxdwvji8f";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
makeFlags=( "PREFIX=$out" )
|
makeFlags=( "PREFIX=$out" )
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,6 @@ stdenv.mkDerivation rec {
|
||||||
readline
|
readline
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,6 @@ stdenv.mkDerivation {
|
||||||
hash = "sha256-KbeY667Y/ZPUuRIGYOZMMAuVEVJ7Kn9UDUSThX5zfII=";
|
hash = "sha256-KbeY667Y/ZPUuRIGYOZMMAuVEVJ7Kn9UDUSThX5zfII=";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
sh configure.sh --prefix=/
|
sh configure.sh --prefix=/
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ buildGoModule rec {
|
||||||
"-w"
|
"-w"
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
|
|
||||||
passthru.updateScript = nix-update-script { };
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"pic"
|
"pic"
|
||||||
"pie" # MBR gets too big with PIE
|
|
||||||
"stackprotector"
|
"stackprotector"
|
||||||
"fortify"
|
"fortify"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"pie"
|
|
||||||
"stackprotector"
|
"stackprotector"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]);
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]);
|
||||||
|
|
||||||
# darwin currently lacks a pure `pgrep` which is extensively used here
|
# darwin currently lacks a pure `pgrep` which is extensively used here
|
||||||
|
|
|
||||||
|
|
@ -80,9 +80,6 @@ stdenv.mkDerivation rec {
|
||||||
"FPC=${startFPC}/bin/fpc"
|
"FPC=${startFPC}/bin/fpc"
|
||||||
];
|
];
|
||||||
|
|
||||||
# disabled by default in fpcsrc/compiler/llvm/agllvm.pas
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
installFlags = [ "INSTALL_PREFIX=\${out}" ];
|
installFlags = [ "INSTALL_PREFIX=\${out}" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,6 @@ pipe
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"format"
|
"format"
|
||||||
"pie"
|
|
||||||
"stackclashprotection"
|
"stackclashprotection"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -474,13 +474,6 @@ stdenv.mkDerivation {
|
||||||
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# GHC cannot currently produce outputs that are ready for `-pie` linking.
|
|
||||||
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
|
|
||||||
# See:
|
|
||||||
# * https://github.com/NixOS/nixpkgs/issues/129247
|
|
||||||
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
# Sanity check, can ghc create executables?
|
# Sanity check, can ghc create executables?
|
||||||
|
|
|
||||||
|
|
@ -438,13 +438,6 @@ stdenv.mkDerivation {
|
||||||
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# GHC cannot currently produce outputs that are ready for `-pie` linking.
|
|
||||||
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
|
|
||||||
# See:
|
|
||||||
# * https://github.com/NixOS/nixpkgs/issues/129247
|
|
||||||
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
# Sanity check, can ghc create executables?
|
# Sanity check, can ghc create executables?
|
||||||
|
|
|
||||||
|
|
@ -417,13 +417,6 @@ stdenv.mkDerivation {
|
||||||
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# GHC cannot currently produce outputs that are ready for `-pie` linking.
|
|
||||||
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
|
|
||||||
# See:
|
|
||||||
# * https://github.com/NixOS/nixpkgs/issues/129247
|
|
||||||
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
# Sanity check, can ghc create executables?
|
# Sanity check, can ghc create executables?
|
||||||
|
|
|
||||||
|
|
@ -432,13 +432,6 @@ stdenv.mkDerivation {
|
||||||
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
"$out/bin/ghc-pkg" --package-db="$package_db" recache
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# GHC cannot currently produce outputs that are ready for `-pie` linking.
|
|
||||||
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
|
|
||||||
# See:
|
|
||||||
# * https://github.com/NixOS/nixpkgs/issues/129247
|
|
||||||
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
# Sanity check, can ghc create executables?
|
# Sanity check, can ghc create executables?
|
||||||
|
|
|
||||||
|
|
@ -780,14 +780,8 @@ stdenv.mkDerivation (
|
||||||
|
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
|
|
||||||
# GHC cannot currently produce outputs that are ready for `-pie` linking.
|
|
||||||
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
|
|
||||||
# See:
|
|
||||||
# * https://github.com/NixOS/nixpkgs/issues/129247
|
|
||||||
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"format"
|
"format"
|
||||||
"pie"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# big-parallel allows us to build with more than 2 cores on
|
# big-parallel allows us to build with more than 2 cores on
|
||||||
|
|
|
||||||
|
|
@ -600,14 +600,8 @@ stdenv.mkDerivation (
|
||||||
|
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
|
|
||||||
# GHC cannot currently produce outputs that are ready for `-pie` linking.
|
|
||||||
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
|
|
||||||
# See:
|
|
||||||
# * https://github.com/NixOS/nixpkgs/issues/129247
|
|
||||||
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"format"
|
"format"
|
||||||
"pie"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# big-parallel allows us to build with more than 2 cores on
|
# big-parallel allows us to build with more than 2 cores on
|
||||||
|
|
|
||||||
|
|
@ -134,8 +134,7 @@ stdenv.mkDerivation (
|
||||||
];
|
];
|
||||||
# x86_64-unknown-linux-musl-ld: -r and -pie may not be used together
|
# x86_64-unknown-linux-musl-ld: -r and -pie may not be used together
|
||||||
hardeningDisable =
|
hardeningDisable =
|
||||||
lib.optional (lib.versionAtLeast version "4.09" && stdenv.hostPlatform.isMusl) "pie"
|
lib.optional (lib.versionAtLeast version "5.0" && stdenv.cc.isClang) "strictoverflow"
|
||||||
++ lib.optional (lib.versionAtLeast version "5.0" && stdenv.cc.isClang) "strictoverflow"
|
|
||||||
++ lib.optionals (args ? hardeningDisable) args.hardeningDisable;
|
++ lib.optionals (args ? hardeningDisable) args.hardeningDisable;
|
||||||
|
|
||||||
# Older versions have some race:
|
# Older versions have some race:
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ let
|
||||||
|
|
||||||
static_gtest = gtest.overrideAttrs (old: {
|
static_gtest = gtest.overrideAttrs (old: {
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
disableHardening = [ "pie" ];
|
|
||||||
cmakeFlags = old.cmakeFlags ++ [ "-DBUILD_SHARED_LIBS=OFF" ];
|
cmakeFlags = old.cmakeFlags ++ [ "-DBUILD_SHARED_LIBS=OFF" ];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -730,13 +730,7 @@ lib.fix (
|
||||||
# package specifies `hardeningDisable`.
|
# package specifies `hardeningDisable`.
|
||||||
hardeningDisable =
|
hardeningDisable =
|
||||||
lib.optionals (args ? hardeningDisable) hardeningDisable
|
lib.optionals (args ? hardeningDisable) hardeningDisable
|
||||||
++ lib.optional (ghc.isHaLVM or false) "all"
|
++ lib.optional (ghc.isHaLVM or false) "all";
|
||||||
# Static libraries (ie. all of pkgsStatic.haskellPackages) fail to build
|
|
||||||
# because by default Nix adds `-pie` to the linker flags: this
|
|
||||||
# conflicts with the `-r` and `-no-pie` flags added by GHC (see
|
|
||||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/19580). hardeningDisable
|
|
||||||
# changes the default Nix behavior regarding adding "hardening" flags.
|
|
||||||
++ lib.optional enableStaticLibraries "pie";
|
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
|
|
|
||||||
|
|
@ -122,11 +122,6 @@ stdenv.mkDerivation {
|
||||||
cd builddir
|
cd builddir
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# ;; Loading file ../src/defmacro.lisp ...
|
|
||||||
# *** - handle_fault error2 ! address = 0x8 not in [0x1000000c0000,0x1000000c0000) !
|
|
||||||
# SIGSEGV cannot be cured. Fault address = 0x8.
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
postInstall = lib.optionalString (withModules != [ ]) ''
|
postInstall = lib.optionalString (withModules != [ ]) ''
|
||||||
|
|
|
||||||
|
|
@ -584,9 +584,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
export CFLAGS_NODIST="-fno-semantic-interposition"
|
export CFLAGS_NODIST="-fno-semantic-interposition"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Our aarch64-linux bootstrap files lack Scrt1.o, which fails the config test
|
|
||||||
hardeningEnable = lib.optionals (!withMinimalDeps && !stdenv.hostPlatform.isAarch64) [ "pie" ];
|
|
||||||
|
|
||||||
setupHook = python-setup-hook sitePackages;
|
setupHook = python-setup-hook sitePackages;
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
sourceRoot=$(readlink -e "./libgcc")
|
sourceRoot=$(readlink -e "./libgcc")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
# Drop in libiberty, as external builds are not expected
|
# Drop in libiberty, as external builds are not expected
|
||||||
cd "$buildRoot"
|
cd "$buildRoot"
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,11 @@ in
|
||||||
makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
|
makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# The pie, stackprotector and fortify hardening flags are autodetected by
|
# The stackprotector and fortify hardening flags are autodetected by
|
||||||
# glibc and enabled by default if supported. Setting it for every gcc
|
# glibc and enabled by default if supported. Setting it for every gcc
|
||||||
# invocation does not work.
|
# invocation does not work.
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"fortify"
|
"fortify"
|
||||||
"pie"
|
|
||||||
"stackprotector"
|
"stackprotector"
|
||||||
"strictflexarrays3"
|
"strictflexarrays3"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@ buildDunePackage rec {
|
||||||
export sourceRoot=$PWD
|
export sourceRoot=$PWD
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# x86_64-unknown-linux-musl-ld: -r and -pie may not be used together
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
menhir
|
menhir
|
||||||
odoc
|
odoc
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,6 @@ buildGoModule (finalAttrs: {
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
# /nix/store/.../bin/ld: internal/mkcw/embed/entrypoint_amd64.o: relocation R_X86_64_32S against `.rodata.1' can not be used when making a PIE object; recompile with -fPIE
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
go-md2man
|
go-md2man
|
||||||
installShellFiles
|
installShellFiles
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,6 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"format"
|
"format"
|
||||||
"pie"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
configurePlatforms = [
|
configurePlatforms = [
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"format"
|
"format"
|
||||||
"pie"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
configurePlatforms = [
|
configurePlatforms = [
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
];
|
];
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
# x86_64-unknown-linux-musl-ld: -r and -pie may not be used together
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"format"
|
"format"
|
||||||
"pie"
|
|
||||||
]
|
]
|
||||||
++ lib.optionals enableStatic [ "fortify" ];
|
++ lib.optionals enableStatic [ "fortify" ];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -573,7 +573,6 @@ lib.makeOverridable (
|
||||||
"fortify"
|
"fortify"
|
||||||
"stackprotector"
|
"stackprotector"
|
||||||
"pic"
|
"pic"
|
||||||
"pie"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
|
|
|
||||||
|
|
@ -254,8 +254,6 @@ stdenv.mkDerivation {
|
||||||
--replace-fail '@nixStoreDirLen@' "''${#NIX_STORE}"
|
--replace-fail '@nixStoreDirLen@' "''${#NIX_STORE}"
|
||||||
'' postPatch;
|
'' postPatch;
|
||||||
|
|
||||||
hardeningEnable = lib.optional (!stdenv.hostPlatform.isDarwin) "pie";
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
preInstall = ''
|
preInstall = ''
|
||||||
|
|
|
||||||
|
|
@ -137,8 +137,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
preConfigure = (lib.concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
|
preConfigure = (lib.concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
|
||||||
|
|
||||||
hardeningEnable = optional (!stdenv.hostPlatform.isDarwin) "pie";
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
|
||||||
|
|
@ -169,8 +169,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Scalable, high-performance, open source NoSQL database";
|
description = "Scalable, high-performance, open source NoSQL database";
|
||||||
homepage = "http://www.mongodb.org";
|
homepage = "http://www.mongodb.org";
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
__structuredAttrs = true;
|
__structuredAttrs = true;
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.cc.isClang) [ "pie" ];
|
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
"dev"
|
"dev"
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,6 @@ let
|
||||||
"nostrictaliasing"
|
"nostrictaliasing"
|
||||||
"pacret"
|
"pacret"
|
||||||
"pic"
|
"pic"
|
||||||
"pie"
|
|
||||||
"relro"
|
"relro"
|
||||||
"stackprotector"
|
"stackprotector"
|
||||||
"glibcxxassertions"
|
"glibcxxassertions"
|
||||||
|
|
@ -439,7 +438,7 @@ let
|
||||||
else
|
else
|
||||||
subtractLists hardeningDisable' (defaultHardeningFlags ++ hardeningEnable);
|
subtractLists hardeningDisable' (defaultHardeningFlags ++ hardeningEnable);
|
||||||
# hardeningDisable additionally supports "all".
|
# hardeningDisable additionally supports "all".
|
||||||
erroneousHardeningFlags = subtractLists knownHardeningFlags (
|
erroneousHardeningFlags = subtractLists (knownHardeningFlags ++ [ "pie" ]) (
|
||||||
hardeningEnable ++ remove "all" hardeningDisable
|
hardeningEnable ++ remove "all" hardeningDisable
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -637,7 +636,9 @@ let
|
||||||
else
|
else
|
||||||
null
|
null
|
||||||
} =
|
} =
|
||||||
builtins.concatStringsSep " " enabledHardeningOptions;
|
lib.warnIf ((builtins.elem "pie" hardeningEnable) || (builtins.elem "pie" hardeningDisable))
|
||||||
|
"The 'pie' hardening flag has been removed in favor of enabling PIE by default in compilers and should no longer be used. PIE can be disabled with the -no-pie compiler flag, but this is usually not necessary as most build systems pass this if needed. Usage of the 'pie' hardening flag will become an error in future."
|
||||||
|
(builtins.concatStringsSep " " enabledHardeningOptions);
|
||||||
|
|
||||||
# TODO: remove platform condition
|
# TODO: remove platform condition
|
||||||
# Enabling this check could be a breaking change as it requires to edit nix.conf
|
# Enabling this check could be a breaking change as it requires to edit nix.conf
|
||||||
|
|
|
||||||
|
|
@ -696,7 +696,6 @@ nameDrvAfterAttrName (
|
||||||
relROExplicitDisabled = brokenIf true (
|
relROExplicitDisabled = brokenIf true (
|
||||||
checkTestBin
|
checkTestBin
|
||||||
(f2exampleWithStdEnv stdenv {
|
(f2exampleWithStdEnv stdenv {
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
ignoreRelRO = false;
|
ignoreRelRO = false;
|
||||||
|
|
@ -1202,7 +1201,6 @@ nameDrvAfterAttrName (
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
hardeningEnable = [
|
hardeningEnable = [
|
||||||
"fortify"
|
"fortify"
|
||||||
"pie"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
enableParallelChecking = false;
|
enableParallelChecking = false;
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ stdenv.mkDerivation rec {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
w3m
|
w3m
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
# fortify breaks the build with lto and musl for some reason
|
# fortify breaks the build with lto and musl for some reason
|
||||||
++ lib.optional stdenv.hostPlatform.isMusl "fortify";
|
++ lib.optional stdenv.hostPlatform.isMusl "fortify";
|
||||||
|
|
||||||
# hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
separateDebugInfo = stdenv.hostPlatform.isLinux && !enableStatic;
|
separateDebugInfo = stdenv.hostPlatform.isLinux && !enableStatic;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
"doc"
|
"doc"
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
|
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
"shadowstack"
|
"shadowstack"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@ let
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mesonLibraryLayer = finalAttrs: prevAttrs: {
|
mesonLibraryLayer = finalAttrs: prevAttrs: {
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-+MNIZQnecFGSE4sA7ywAu73Q6Eww1cB9I/xzqdxMycw=";
|
hash = "sha256-+MNIZQnecFGSE4sA7ywAu73Q6Eww1cB9I/xzqdxMycw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# PIE is incompatible with the "persistent malloc" ("pma") feature.
|
|
||||||
# While build system attempts to pass -no-pie to gcc. nixpkgs' `ld`
|
|
||||||
# wrapped still passes `-pie` flag to linker and breaks linkage.
|
|
||||||
# Let's disable "pie" until `ld` is fixed to do the right thing.
|
|
||||||
hardeningDisable = [ "pie" ];
|
|
||||||
|
|
||||||
# When we do build separate interactive version, it makes sense to always include man.
|
# When we do build separate interactive version, it makes sense to always include man.
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue