From be528426ddcacc10bf785ab577ba8e005ac1f209 Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Sat, 29 Mar 2025 18:43:06 +0100 Subject: [PATCH] fpc: disable PIE hardening Fails with the usual error: ld: fpmake.o: relocation R_X86_64_32S against `.bss.n_u_$p$fpmake_$$_p' can not be used when making a PIE object; recompile with -fPIE ld: failed to set dynamic section sizes: bad value The build system is hard to decipher, so just disable PIE for now. --- pkgs/development/compilers/fpc/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix index 6b8fa48511c0..d5167b52a700 100644 --- a/pkgs/development/compilers/fpc/default.nix +++ b/pkgs/development/compilers/fpc/default.nix @@ -77,6 +77,9 @@ stdenv.mkDerivation rec { "FPC=${startFPC}/bin/fpc" ]; + # disabled by default in fpcsrc/compiler/llvm/agllvm.pas + hardeningDisable = [ "pie" ]; + installFlags = [ "INSTALL_PREFIX=\${out}" ]; postInstall = ''