toolchain: gcc: update to 12.3.0
[openwrt/openwrt.git] / toolchain / gcc / common.mk
index e885141538c0e7478d2209c010e3d2a07f4c873c..677fb2538181812e8b4cf46176b2f35306c9da00 100644 (file)
@@ -33,8 +33,12 @@ ifeq ($(PKG_VERSION),11.3.0)
   PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39
 endif
 
-ifeq ($(PKG_VERSION),12.2.0)
-  PKG_HASH:=e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff
+ifeq ($(PKG_VERSION),12.3.0)
+  PKG_HASH:=949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b
+endif
+
+ifeq ($(PKG_VERSION),13.1.0)
+  PKG_HASH:=61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86
 endif
 
 PATCH_DIR=../patches-$(GCC_MAJOR_VERSION).x
@@ -66,6 +70,9 @@ TAR_OPTIONS += \
        --exclude-from='$(CURDIR)/../exclude-testsuite' --exclude=gcc/ada/*.ad* \
        --exclude=libjava
 
+# this needs to be without -L/-lzstd flags or other parts fail to build
+# use an absolute path to ensure it really picks up our version
+export ac_cv_search_ZSTD_compress=$(STAGING_DIR_HOST)/lib/libzstd.a -pthread
 export libgcc_cv_fixed_point=no
 ifdef CONFIG_INSTALL_GCCGO
   export libgo_cv_c_split_stack_supported=no
@@ -103,7 +110,7 @@ GCC_CONFIGURE:= \
                $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \
                $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--with-abi=elfv2)) \
                --with-system-zlib=$(STAGING_DIR_HOST) \
-               --without-zstd \
+               --with-zstd=$(STAGING_DIR_HOST) \
                --with-gmp=$(STAGING_DIR_HOST) \
                --with-mpfr=$(STAGING_DIR_HOST) \
                --with-mpc=$(STAGING_DIR_HOST) \
@@ -184,10 +191,10 @@ define Host/SetToolchainInfo
 endef
 
 
-ifeq ($(GCC_MAJOR_VERSION),12)
-       GCC_VERSION_FILE:=gcc/genversion.cc
-else
+ifeq ($(GCC_MAJOR_VERSION),11)
        GCC_VERSION_FILE:=gcc/version.c
+else
+       GCC_VERSION_FILE:=gcc/genversion.cc
 endif
 
 ifneq ($(GCC_PREPARE),)