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>
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
HOST_BUILD_PARALLEL:=1
-PATCH_DIR:=./patches/$(PKG_VERSION)
+PATCH_DIR:=./patches/$(BASE_VERSION)
include $(INCLUDE_DIR)/toolchain-build.mk