toolchain/gcc: use STAGING_DIR_HOST instead of hardcoding default
[openwrt/staging/nbd.git] / toolchain / gcc / common.mk
index 7371579b32be99c6a7fecb7e5c8740edcd053f60..7eae855eea42c7ba1d4a2166cf615b0ddcc0d8a1 100644 (file)
@@ -29,14 +29,6 @@ GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 
-ifeq ($(PKG_VERSION),8.4.0)
-  PKG_HASH:=e30a6e52d10e1f27ed55104ad233c30bd1e99cfb5ff98ab022dc941edd1b2dd4
-endif
-
-ifeq ($(PKG_VERSION),10.3.0)
-  PKG_HASH:=64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344
-endif
-
 ifeq ($(PKG_VERSION),11.3.0)
   PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39
 endif
@@ -80,7 +72,7 @@ ifdef CONFIG_INSTALL_GCCGO
 endif
 
 ifdef CONFIG_GCC_USE_GRAPHITE
-  GRAPHITE_CONFIGURE:= --with-isl=$(TOPDIR)/staging_dir/host
+  GRAPHITE_CONFIGURE:= --with-isl=$(STAGING_DIR_HOST)
 else
   GRAPHITE_CONFIGURE:= --without-isl --without-cloog
 endif
@@ -114,10 +106,9 @@ GCC_CONFIGURE:= \
                        --with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \
                $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \
                $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--with-abi=elfv2)) \
-               --with-gmp=$(TOPDIR)/staging_dir/host \
-               --with-mpfr=$(TOPDIR)/staging_dir/host \
-               --with-mpc=$(TOPDIR)/staging_dir/host \
-               --with-zstd=$(TOPDIR)/staging_dir/host \
+               --with-gmp=$(STAGING_DIR_HOST) \
+               --with-mpfr=$(STAGING_DIR_HOST) \
+               --with-mpc=$(STAGING_DIR_HOST) \
                --disable-decimal-float \
                --with-diagnostics-color=auto-if-env \
                --enable-__cxa_atexit \
@@ -187,7 +178,7 @@ define Host/SetToolchainInfo
 endef
 
 
-ifdef CONFIG_GCC_USE_VERSION_12
+ifeq ($(GCC_MAJOR_VERSION),12)
        GCC_VERSION_FILE:=gcc/genversion.cc
 else
        GCC_VERSION_FILE:=gcc/version.c