From 168959b55be34131b7886cb34f82d56c1ed0f243 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 29 Aug 2025 15:38:31 +0200 Subject: [PATCH] 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. --- pkgs/development/interpreters/python/cpython/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 35938794696a..083c33cee838 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -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;