toolchain: binutils: simplify patch management

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>
This commit is contained in:
Konstantin Demin 2026-04-17 23:47:11 +03:00 committed by Nick Hainke
parent 48399eba13
commit eac927fadf

View 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