cpython: disable pie on aarch64-linux minimal

The intermediate pythonMinimal build that uses the glibc from bootstrap
files cannot currently be built with PIE, because the Scrt.o startup
script is missing in there.
This commit is contained in:
Martin Weinelt
2025-08-29 15:38:31 +02:00
parent 69ed93c6a7
commit 168959b55b
@@ -604,7 +604,8 @@ stdenv.mkDerivation (finalAttrs: {
export CFLAGS_NODIST="-fno-semantic-interposition"
'';
hardeningEnable = [ "pie" ];
# 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;