From 0c7e14e68880b6274c8e7dd171efbcbd04757555 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Thu, 16 Oct 2025 18:09:55 -0700 Subject: [PATCH] gcc: disable enableDefaultPie when !hasSharedLibraries In discussion on #439314 conditionalizing this seemed unnecessary as pkgsStatic's gcc kept working. However, some less typical !hasSharedLibraries stdenvs for embedded platforms broke. It seems simplest to make this conditional on hasSharedLibraries for now. We may need to revisit this if we want to enable static-pie by default with gcc spec file changes. --- pkgs/development/compilers/gcc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index e6acca591005..74d482bea205 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -19,7 +19,7 @@ cargo, staticCompiler ? false, enableShared ? stdenv.targetPlatform.hasSharedLibraries, - enableDefaultPie ? true, + enableDefaultPie ? stdenv.targetPlatform.hasSharedLibraries, enableLTO ? stdenv.hostPlatform.hasSharedLibraries, texinfo ? null, perl ? null, # optional, for texi2pod (then pod2man)