diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index dd61d1e210..0565b1ec9f 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -19,7 +19,7 @@ config GCC_VERSION default "7.5.0" if GCC_VERSION_7 default "9.3.0" if GCC_VERSION_9 default "10.3.0" if GCC_VERSION_10 - default "11.2.0" if GCC_VERSION_11 + default "11.3.0" if GCC_VERSION_11 default "8.4.0" config GCC_USE_IREMAP diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 76c5fc114a..cd021addf1 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -44,8 +44,8 @@ ifeq ($(PKG_VERSION),10.3.0) PKG_HASH:=64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344 endif -ifeq ($(PKG_VERSION),11.2.0) - PKG_HASH:=d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b +ifeq ($(PKG_VERSION),11.3.0) + PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39 endif PATCH_DIR=../patches/$(GCC_VERSION) diff --git a/toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch b/toolchain/gcc/patches/11.3.0/001-Revert-Cleanup-range-of-address-calculations.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch rename to toolchain/gcc/patches/11.3.0/001-Revert-Cleanup-range-of-address-calculations.patch diff --git a/toolchain/gcc/patches/11.2.0/002-case_insensitive.patch b/toolchain/gcc/patches/11.3.0/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/002-case_insensitive.patch rename to toolchain/gcc/patches/11.3.0/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/11.2.0/010-documentation.patch b/toolchain/gcc/patches/11.3.0/010-documentation.patch similarity index 94% rename from toolchain/gcc/patches/11.2.0/010-documentation.patch rename to toolchain/gcc/patches/11.3.0/010-documentation.patch index 885bd0301d..25a5e1e99c 100644 --- a/toolchain/gcc/patches/11.2.0/010-documentation.patch +++ b/toolchain/gcc/patches/11.3.0/010-documentation.patch @@ -12,7 +12,7 @@ Date: Tue Feb 26 16:16:33 2013 +0000 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in -@@ -3355,18 +3355,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) +@@ -3348,18 +3348,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) doc/gccint.info: $(TEXI_GCCINT_FILES) doc/cppinternals.info: $(TEXI_CPPINT_FILES) diff --git a/toolchain/gcc/patches/11.3.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch b/toolchain/gcc/patches/11.3.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch new file mode 100644 index 0000000000..423def6000 --- /dev/null +++ b/toolchain/gcc/patches/11.3.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch @@ -0,0 +1,46 @@ +From ea650cae26da4a8fc04f0c4666f4dd776d0b5fc0 Mon Sep 17 00:00:00 2001 +From: Ilya Lipnitskiy +Date: Sun, 14 Nov 2021 21:54:25 -0800 +Subject: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl + +musl only uses PT_GNU_STACK to set default thread stack size and has no +executable stack support[0], so there is no reason not to emit the +.note.GNU-stack section on musl builds. + +[0]: https://lore.kernel.org/all/20190423192534.GN23599@brightrain.aerifal.cx/T/#u + +gcc/ChangeLog: + + * configure: Regenerate. + * configure.ac: define TARGET_LIBC_GNUSTACK on musl + +Signed-off-by: Ilya Lipnitskiy +--- + gcc/configure | 3 +++ + gcc/configure.ac | 3 +++ + 2 files changed, 6 insertions(+) + +--- a/gcc/configure ++++ b/gcc/configure +@@ -31533,6 +31533,9 @@ fi + # Check if the target LIBC handles PT_GNU_STACK. + gcc_cv_libc_gnustack=unknown + case "$target" in ++ mips*-*-linux-musl*) ++ gcc_cv_libc_gnustack=yes ++ ;; + mips*-*-linux*) + + if test $glibc_version_major -gt 2 \ +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -7023,6 +7023,9 @@ fi + # Check if the target LIBC handles PT_GNU_STACK. + gcc_cv_libc_gnustack=unknown + case "$target" in ++ mips*-*-linux-musl*) ++ gcc_cv_libc_gnustack=yes ++ ;; + mips*-*-linux*) + GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], ) + ;; diff --git a/toolchain/gcc/patches/11.2.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/11.3.0/110-Fix-MIPS-PR-84790.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/110-Fix-MIPS-PR-84790.patch rename to toolchain/gcc/patches/11.3.0/110-Fix-MIPS-PR-84790.patch diff --git a/toolchain/gcc/patches/11.2.0/230-musl_libssp.patch b/toolchain/gcc/patches/11.3.0/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/230-musl_libssp.patch rename to toolchain/gcc/patches/11.3.0/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/11.2.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/11.3.0/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches/11.3.0/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/11.2.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/11.3.0/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches/11.3.0/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/11.2.0/820-libgcc_pic.patch b/toolchain/gcc/patches/11.3.0/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/820-libgcc_pic.patch rename to toolchain/gcc/patches/11.3.0/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/11.2.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/11.3.0/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches/11.3.0/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/11.2.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/11.3.0/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches/11.3.0/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/11.2.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/11.3.0/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches/11.3.0/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/11.2.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/11.3.0/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/870-ppc_no_crtsavres.patch rename to toolchain/gcc/patches/11.3.0/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches/11.2.0/881-no_tm_section.patch b/toolchain/gcc/patches/11.3.0/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/881-no_tm_section.patch rename to toolchain/gcc/patches/11.3.0/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/11.2.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/11.3.0/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/900-bad-mips16-crt.patch rename to toolchain/gcc/patches/11.3.0/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/11.2.0/910-mbsd_multi.patch b/toolchain/gcc/patches/11.3.0/910-mbsd_multi.patch similarity index 97% rename from toolchain/gcc/patches/11.2.0/910-mbsd_multi.patch rename to toolchain/gcc/patches/11.3.0/910-mbsd_multi.patch index 9f9d3226e8..21f532043e 100644 --- a/toolchain/gcc/patches/11.2.0/910-mbsd_multi.patch +++ b/toolchain/gcc/patches/11.3.0/910-mbsd_multi.patch @@ -40,7 +40,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 case OPT_fconstant_string_class_: constant_string_class_name = arg; break; -@@ -1196,6 +1205,47 @@ c_common_init (void) +@@ -1198,6 +1207,47 @@ c_common_init (void) return false; } @@ -114,7 +114,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 ; On SVR4 targets, it also controls whether or not to emit a --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -9055,6 +9055,17 @@ This option is only supported for C and +@@ -9058,6 +9058,17 @@ This option is only supported for C and @option{-Wall} and by @option{-Wpedantic}, which can be disabled with @option{-Wno-pointer-sign}. diff --git a/toolchain/gcc/patches/11.2.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/11.3.0/920-specs_nonfatal_getenv.patch similarity index 90% rename from toolchain/gcc/patches/11.2.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches/11.3.0/920-specs_nonfatal_getenv.patch index dda33c0202..83bcb25a80 100644 --- a/toolchain/gcc/patches/11.2.0/920-specs_nonfatal_getenv.patch +++ b/toolchain/gcc/patches/11.3.0/920-specs_nonfatal_getenv.patch @@ -7,7 +7,7 @@ Date: Sat Apr 21 03:02:39 2012 +0000 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -10100,8 +10100,10 @@ getenv_spec_function (int argc, const ch +@@ -10106,8 +10106,10 @@ getenv_spec_function (int argc, const ch } if (!value) diff --git a/toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/11.3.0/930-fix-mips-noexecstack.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch rename to toolchain/gcc/patches/11.3.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/11.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/11.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch rename to toolchain/gcc/patches/11.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches/11.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches/11.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch similarity index 100% rename from toolchain/gcc/patches/11.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch rename to toolchain/gcc/patches/11.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch b/toolchain/gcc/patches/11.3.0/970-macos_arm64-building-fix.patch similarity index 74% rename from toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch rename to toolchain/gcc/patches/11.3.0/970-macos_arm64-building-fix.patch index 6572b8e559..424899eb9c 100644 --- a/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch +++ b/toolchain/gcc/patches/11.3.0/970-macos_arm64-building-fix.patch @@ -15,11 +15,9 @@ Date: Mon Aug 16 13:16:21 2021 +0100 Reviewed-by: John Scipione Reviewed-by: Adrien Destugues -diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h -index 976f9afae5..736b83ff0b 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h -@@ -1000,7 +1000,7 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv); +@@ -1236,7 +1236,7 @@ extern const char *aarch64_rewrite_mcpu #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ { "rewrite_mcpu", aarch64_rewrite_mcpu }, @@ -28,8 +26,6 @@ index 976f9afae5..736b83ff0b 100644 extern const char *host_detect_local_cpu (int argc, const char **argv); #define HAVE_LOCAL_CPU_DETECT # define EXTRA_SPEC_FUNCTIONS \ -diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c -index 8f700eec85..b737abc006 100644 --- a/gcc/config/host-darwin.c +++ b/gcc/config/host-darwin.c @@ -22,6 +22,8 @@ @@ -40,8 +36,8 @@ index 8f700eec85..b737abc006 100644 +#include "hosthooks-def.h" /* Yes, this is really supposed to work. */ - static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); -@@ -75,3 +77,5 @@ darwin_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off) + /* This allows for a pagesize of 16384, which we have on Darwin20, but should +@@ -79,3 +81,5 @@ darwin_gt_pch_use_address (void *addr, s return ret; }