Revert "toolchain/gcc: use zstd from tools"
[openwrt/staging/nbd.git] / toolchain / gcc / common.mk
index 8fa9459f50564f65ad3ca4a0e3d7380455c8b636..83884dd54c0f4f9aa29fd86e25ddc14ec0550afe 100644 (file)
@@ -23,6 +23,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=gcc
 GCC_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION))
 PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION)))
+GCC_MAJOR_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION)))
 GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
@@ -40,11 +41,11 @@ ifeq ($(PKG_VERSION),11.3.0)
   PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39
 endif
 
-ifeq ($(PKG_VERSION),12.1.0)
-  PKG_HASH:=62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b
+ifeq ($(PKG_VERSION),12.2.0)
+  PKG_HASH:=e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff
 endif
 
-PATCH_DIR=../patches/$(GCC_VERSION)
+PATCH_DIR=../patches-$(GCC_MAJOR_VERSION).x
 
 BUGURL=http://bugs.openwrt.org/
 PKGVERSION=OpenWrt GCC $(PKG_VERSION) $(REVISION)
@@ -119,7 +120,7 @@ GCC_CONFIGURE:= \
                --disable-decimal-float \
                --with-diagnostics-color=auto-if-env \
                --enable-__cxa_atexit \
-               --disable-libstdcxx-dual-abi \
+               --enable-libstdcxx-dual-abi \
                --with-default-libstdcxx-abi=new
 ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
   GCC_CONFIGURE += --with-mips-plt