diff --git a/pkgs/development/compilers/gcc/patches/14/aarch64-fix-ice-subreg.patch b/pkgs/development/compilers/gcc/patches/14/aarch64-fix-ice-subreg.patch deleted file mode 100644 index a8783ddbfa27..000000000000 --- a/pkgs/development/compilers/gcc/patches/14/aarch64-fix-ice-subreg.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md -index d3c381e82ce..6a481059bf0 100644 ---- a/gcc/config/aarch64/aarch64.md -+++ b/gcc/config/aarch64/aarch64.md -@@ -6161,8 +6161,8 @@ - (match_dup 1)) - (match_dup 2))] - { -- operands[2] = lowpart_subreg (mode, operands[2], -- mode); -+ operands[2] = force_lowpart_subreg (mode, operands[2], -+ mode); - } - [(set_attr "type" "bfm,neon_ins_q,neon_ins_q") - (set_attr "arch" "*,simd,simd")] -@@ -7210,7 +7210,7 @@ - - emit_insn (gen_iorv23 ( - lowpart_subreg (V2mode, operands[0], mode), -- lowpart_subreg (V2mode, operands[1], mode), -+ force_lowpart_subreg (V2mode, operands[1], mode), - v_bitmask)); - DONE; - } -@@ -7255,8 +7255,8 @@ - "TARGET_SIMD" - { - rtx tmp = gen_reg_rtx (mode); -- rtx op1 = lowpart_subreg (mode, operands[1], mode); -- rtx op2 = lowpart_subreg (mode, operands[2], mode); -+ rtx op1 = force_lowpart_subreg (mode, operands[1], mode); -+ rtx op2 = force_lowpart_subreg (mode, operands[2], mode); - emit_insn (gen_xorsign3 (mode, tmp, op1, op2)); - emit_move_insn (operands[0], - lowpart_subreg (mode, tmp, mode)); -diff --git a/gcc/explow.cc b/gcc/explow.cc -index f6843398c4b..80f59418bca 100644 ---- a/gcc/explow.cc -+++ b/gcc/explow.cc -@@ -760,6 +760,34 @@ force_subreg (machine_mode outermode, rtx op, - return simplify_gen_subreg (outermode, op, innermode, byte); - } - -+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP, -+ which has mode INNERMODE. Allow OP to be forced into a new register -+ if necessary. -+ -+ Return null on failure. */ -+ -+rtx -+force_lowpart_subreg (machine_mode outermode, rtx op, -+ machine_mode innermode) -+{ -+ auto byte = subreg_lowpart_offset (outermode, innermode); -+ return force_subreg (outermode, op, innermode, byte); -+} -+ -+/* Try to return an rvalue expression for the OUTERMODE highpart of OP, -+ which has mode INNERMODE. Allow OP to be forced into a new register -+ if necessary. -+ -+ Return null on failure. */ -+ -+rtx -+force_highpart_subreg (machine_mode outermode, rtx op, -+ machine_mode innermode) -+{ -+ auto byte = subreg_highpart_offset (outermode, innermode); -+ return force_subreg (outermode, op, innermode, byte); -+} -+ - /* If X is a memory ref, copy its contents to a new temp reg and return - that reg. Otherwise, return X. */ - -diff --git a/gcc/explow.h b/gcc/explow.h -index cbd1fcb7eb3..de89e9e2933 100644 ---- a/gcc/explow.h -+++ b/gcc/explow.h -@@ -43,6 +43,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode); - extern rtx force_reg (machine_mode, rtx); - - extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64); -+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode); -+extern rtx force_highpart_subreg (machine_mode, rtx, machine_mode); - - /* Return given rtx, copied into a new temp reg if it was in memory. */ - extern rtx force_not_mem (rtx); diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 598c42a48d3e..7adc06b35779 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -94,11 +94,6 @@ in ++ optional langD ./libphobos.patch ++ optional (!atLeast14) ./cfi_startproc-reorder-label-09-1.diff ++ optional (atLeast14 && !canApplyIainsDarwinPatches) ./cfi_startproc-reorder-label-14-1.diff -# backports of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 -# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118892 -# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119133 -# (hopefully all three will be included in the upcoming 14.3.0 release) -++ optional is14 ./14/aarch64-fix-ice-subreg.patch ## 2. Patches relevant to gcc>=12 on specific platforms #################################### diff --git a/pkgs/development/compilers/gcc/versions.nix b/pkgs/development/compilers/gcc/versions.nix index 3f9debb2d742..63921abef84d 100644 --- a/pkgs/development/compilers/gcc/versions.nix +++ b/pkgs/development/compilers/gcc/versions.nix @@ -1,7 +1,7 @@ let majorMinorToVersionMap = { "15" = "15.1.0"; - "14" = "14.2.1.20250322"; + "14" = "14.3.0"; "13" = "13.3.0"; "12" = "12.4.0"; "11" = "11.5.0"; @@ -18,7 +18,7 @@ let # 3 digits: releases (14.2.0) # 4 digits: snapshots (14.2.1.20250322) "15.1.0" = "sha256-4rCewhZg8B/s/7cV4BICZSFpQ/A40OSKmGhxPlTwbOo="; - "14.2.1.20250322" = "sha256-I3ROhiU4jYaB2aci2Z3B/mvLLTjBBoCF1CL7uiHTmUM="; + "14.3.0" = "sha256-4Nx3KXYlYxrI5Q+pL//v6Jmk63AlktpcMu8E4ik6yjo="; "13.3.0" = "sha256-CEXpYhyVQ6E/SE6UWEpJ/8ASmXDpkUYkI1/B0GGgwIM="; "12.4.0" = "sha256-cE9lJgTMvMsUvavzR4yVEciXiLEss7v/3tNzQZFqkXU="; "11.5.0" = "sha256-puIYaOrVRc+H8MAfhCduS1KB1nIJhZHByJYkHwk2NHg=";