gcc: update to 14.3
authorRobert Marko <redacted>
Tue, 10 Jun 2025 19:43:07 +0000 (21:43 +0200)
committerRobert Marko <redacted>
Wed, 11 Jun 2025 08:55:41 +0000 (10:55 +0200)
Update to 14.3 which is the new default, otherwise GCC fails building
on buildbots.

Signed-off-by: Robert Marko <redacted>
devel/gcc/Makefile
devel/gcc/patches-14.x/010-documentation.patch
devel/gcc/patches-14.x/110-Fix-MIPS-PR-84790.patch [deleted file]
devel/gcc/patches-14.x/230-musl_libssp.patch
devel/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch
devel/gcc/patches-14.x/820-libgcc_pic.patch
devel/gcc/patches-14.x/830-aarch64-libatomic.patch [new file with mode: 0644]
devel/gcc/patches-14.x/920-specs_nonfatal_getenv.patch
devel/gcc/patches-14.x/980-fix-build-error-with-Xcode-16.3.patch [new file with mode: 0644]

index 2e8bbaa5ffc5c275f54371af70f1995517e682ed..abed05da44544829e365bc2b3ebcb0b3e9324968 100644 (file)
@@ -55,8 +55,8 @@ ifeq ($(PKG_VERSION),13.3.0)
   PKG_HASH:=0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083
 endif
 
-ifeq ($(PKG_VERSION),14.2.0)
-       PKG_HASH:=a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
+ifeq ($(PKG_VERSION),14.3.0)
+       PKG_HASH:=e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a
 endif
 
 PATCH_DIR:=patches-$(GCC_MAJOR_VERSION).x
index 7cf59d3a990df1159ee37bf98d688fbee3f97d9c..df9dff9a4f86b26b0275cc2e54bc291aeacc3b9f 100644 (file)
@@ -12,7 +12,7 @@ Date:   Tue Feb 26 16:16:33 2013 +0000
 
 --- a/gcc/Makefile.in
 +++ b/gcc/Makefile.in
-@@ -3549,18 +3549,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
+@@ -3550,18 +3550,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
  doc/gccint.info: $(TEXI_GCCINT_FILES)
  doc/cppinternals.info: $(TEXI_CPPINT_FILES)
  
diff --git a/devel/gcc/patches-14.x/110-Fix-MIPS-PR-84790.patch b/devel/gcc/patches-14.x/110-Fix-MIPS-PR-84790.patch
deleted file mode 100644 (file)
index bd5d1f3..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
-MIPS16 functions have a static assembler prologue which clobbers
-registers v0 and v1. Add these register clobbers to function call
-instructions.
-
---- a/gcc/config/mips/mips.cc
-+++ b/gcc/config/mips/mips.cc
-@@ -3227,6 +3227,12 @@ mips_emit_call_insn (rtx pattern, rtx or
-       emit_insn (gen_update_got_version ());
-     }
-+  if (TARGET_MIPS16 && TARGET_USE_GOT)
-+    {
-+      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
-+      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
-+    }
-+
-   if (TARGET_MIPS16
-       && TARGET_EXPLICIT_RELOCS
-       && TARGET_CALL_CLOBBERED_GP)
index 3ce5e49587f2cec9d63b1df17647804091d52cf8..f8dc9448a0d6ae83a5de92277d21b085a4852ea4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -985,7 +985,9 @@ proper position among the other output f
+@@ -989,7 +989,9 @@ proper position among the other output f
  #endif
  
  #ifndef LINK_SSP_SPEC
index 2cbffe451724ad1e3937cf9bfe3bd2ff388ca59c..11940960ab93753d3f913b558c66e428d768191d 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/gcc/config/mips/mips.cc
 +++ b/gcc/config/mips/mips.cc
-@@ -20453,7 +20453,7 @@ mips_option_override (void)
+@@ -20447,7 +20447,7 @@ mips_option_override (void)
      flag_pcc_struct_return = 0;
  
    /* Decide which rtx_costs structure to use.  */
index 3ab73f4857f9a4b58b104d5014fda6574c7eba53..85b148bfa3b4d1575d8c3a71fc10324ea08139c9 100644 (file)
@@ -31,7 +31,7 @@ Date:   Mon Oct 19 23:26:09 2009 +0000
  ifneq ($(LIBUNWIND),)
  all: libunwind$(SHLIB_EXT)
  libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
-@@ -1174,6 +1175,10 @@ install-shared:
+@@ -1177,6 +1178,10 @@ install-shared:
        chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
        $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
  
diff --git a/devel/gcc/patches-14.x/830-aarch64-libatomic.patch b/devel/gcc/patches-14.x/830-aarch64-libatomic.patch
new file mode 100644 (file)
index 0000000..80d9b54
--- /dev/null
@@ -0,0 +1,32 @@
+libatomic: Do not enforce march on aarch64
+
+Inspired by The Yocto Project [1].
+
+[1] https://github.com/yoctoproject/poky/blob/51192a79f1717786dda42776f916c3d97ada7971/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
+
+Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
+
+ libatomic/Makefile.am | 1 -
+ libatomic/Makefile.in | 1 -
+ 2 files changed, 2 deletions(-)
+
+--- a/libatomic/Makefile.am
++++ b/libatomic/Makefile.am
+@@ -130,7 +130,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZE
+ ## On a target-specific basis, include alternates to be selected by IFUNC.
+ if HAVE_IFUNC
+ if ARCH_AARCH64_LINUX
+-IFUNC_OPTIONS      = -march=armv8-a+lse
+ libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
+ endif
+--- a/libatomic/Makefile.in
++++ b/libatomic/Makefile.in
+@@ -452,7 +452,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE)
+ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
+       _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
+       $(am__append_3) $(am__append_4)
+-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
+ @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
+ @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
+ @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16
index 121b684a2cab553f9c1fa547a08ead72e53381b2..a1b34f40fc3f2aeebe07e983d4e9f94ee453e43e 100644 (file)
@@ -7,7 +7,7 @@ Date:   Sat Apr 21 03:02:39 2012 +0000
 
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -10319,8 +10319,10 @@ getenv_spec_function (int argc, const ch
+@@ -10337,8 +10337,10 @@ getenv_spec_function (int argc, const ch
      }
  
    if (!value)
diff --git a/devel/gcc/patches-14.x/980-fix-build-error-with-Xcode-16.3.patch b/devel/gcc/patches-14.x/980-fix-build-error-with-Xcode-16.3.patch
new file mode 100644 (file)
index 0000000..c551001
--- /dev/null
@@ -0,0 +1,47 @@
+From 93954654b87552c4fe0273cab99d0f42f213f7f8 Mon Sep 17 00:00:00 2001
+From: Georgi Valkov <gvalkov@gmail.com>
+Date: Mon, 14 Apr 2025 15:45:59 +0300
+Subject: [PATCH] zlib: fix build error with Xcode 16.3
+
+Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
+zutil.h conditionally defines fdopen as NULL when this macro is defined,
+resulting in the following build error:
+
+/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
+  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
+      |          ^
+./zutil.h:147:33: note: expanded from macro 'fdopen'
+  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
+
+In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
+block was ignored, gcc and gdb used to compile and work fine.
+
+This may have been used for compatibility with older versions of macOS,
+but is no longer needed. By pure luck, the build worked fine for a long
+time, because it did not properly detect macOS.
+Fixed by removing the check for TARGET_OS_MAC.
+
+Note that since Xcode 16.3, an entire set of TARGET_OS macros
+are now defined, most of which are set to 0:
+TARGET_OS_LINUX 0
+TARGET_OS_MAC 1
+TARGET_OS_OSX 1
+
+[1] https://github.com/openwrt/openwrt/pull/18467
+
+Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
+---
+ zlib/zutil.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/zlib/zutil.h
++++ b/zlib/zutil.h
+@@ -130,7 +130,7 @@ extern z_const char * const z_errmsg[10]
+ #  endif
+ #endif
+-#if defined(MACOS) || defined(TARGET_OS_MAC)
++#if defined(MACOS)
+ #  define OS_CODE  7
+ #  ifndef Z_SOLO
+ #    if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
git clone https://git.99rst.org/PROJECT