From df4f7ea7109039334fa12136301020fb0aec5bd3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 17 Dec 2025 06:27:45 +0000 Subject: [PATCH] gcc: don't apply c++tools --enable-default-pie patch for gcc-16+ The patch is already applied upstream at https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3f1f99ef82a65d66e3aaa429bf4fb746b93da0db and causes conflict when applied on top of current git master as: xgcc> applying patch /nix/store/kxfa7n7k3clgw13yafj5irj51gk2w3dg-c++tools-dont-check-enable-default-pie.patch xgcc> patching file c++tools/configure xgcc> Reversed (or previously applied) patch detected! Assume -R? [n] xgcc> Apply anyway? [n] xgcc> Skipping patch. xgcc> 3 out of 3 hunks ignored -- saving rejects to file c++tools/configure.rej xgcc> patching file c++tools/configure.ac xgcc> Reversed (or previously applied) patch detected! Assume -R? [n] xgcc> Apply anyway? [n] xgcc> Skipping patch. xgcc> 1 out of 1 hunk ignored -- saving rejects to file c++tools/configure.ac.rej --- pkgs/development/compilers/gcc/patches/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 8151bf561bf3..d7eeee3eb739 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -99,7 +99,7 @@ optionals noSysDirs ( ++ optional (atLeast14 && !canApplyIainsDarwinPatches) ./cfi_startproc-reorder-label-14-1.diff # c++tools: Don't check --enable-default-pie. # --enable-default-pie breaks bootstrap gcc otherwise, because libiberty.a is not found -++ optional atLeast14 ./c++tools-dont-check-enable-default-pie.patch +++ optional (is14 || is15) ./c++tools-dont-check-enable-default-pie.patch ## 2. Patches relevant on specific platforms ####################################