aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/gcc/common.mk
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2022-09-10 23:41:55 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-09-11 11:24:57 +0200
commitd7382cc0e4446d4db1978055b0ba59259ac66751 (patch)
treee4ad60e1ee24428512e0f0595da77d1aa0da0d83 /toolchain/gcc/common.mk
parentf34690e487e13ee772b2dca3e7fab2a2bd1e77a1 (diff)
downloadupstream-d7382cc0e4446d4db1978055b0ba59259ac66751.tar.gz
upstream-d7382cc0e4446d4db1978055b0ba59259ac66751.tar.bz2
upstream-d7382cc0e4446d4db1978055b0ba59259ac66751.zip
toolchain: gcc: improve patch handling by introducing major version
Every minor version bump of a major version will result in a huge patch diff because of the moving of all the patches from version e.g. 11.2.0 to 11.3.0. This commit only use the major version for the patch folders to differentiate between the different gcc versions. This will significantly improve the reviewing of the smaller version bump patches and help to see what really changed in a minor version bump. Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'toolchain/gcc/common.mk')
-rw-r--r--toolchain/gcc/common.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index f116af7e1a..83884dd54c 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -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)
@@ -44,7 +45,7 @@ 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)