]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
toolchain: binutils: simplify patch management
authorKonstantin Demin <rockdrilla@gmail.com>
Fri, 17 Apr 2026 20:47:11 +0000 (23:47 +0300)
committerNick Hainke <vincent@systemli.org>
Sat, 18 Apr 2026 17:34:21 +0000 (19:34 +0200)
Take in account only first two version components to lookup patch directory.
Hovewer, computed "BASE_VERSION" may be overridden (if necessary).
This change should prevent further issues with binutils being unpatched, see commits adad973a9c34 and 525a1e94b343.

Also drop obsolete "BIN_VERSION" variable (not used anywhere).

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21997
Signed-off-by: Nick Hainke <vincent@systemli.org>
toolchain/binutils/Makefile

index 70cf96e1f98eba3d0aa6af5376900404844838f9..b2b0607a90763047aedeb5f6c633fae4a6fab97e 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=binutils
 PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
-BIN_VERSION:=$(PKG_VERSION)
+BASE_VERSION:=$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(PKG_VERSION))))
 
 PKG_SOURCE_URL:=@GNU/binutils/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -26,7 +26,7 @@ endif
 
 HOST_BUILD_PARALLEL:=1
 
-PATCH_DIR:=./patches/$(PKG_VERSION)
+PATCH_DIR:=./patches/$(BASE_VERSION)
 
 include $(INCLUDE_DIR)/toolchain-build.mk