From b12288fa69b171f7c9405518c9bed3581a06f7ce Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 12 Feb 2021 09:56:56 +0100 Subject: build: add support for fixing up library soname This makes it possible to declare a package ABI_VERSION independent from the upstream soname by setting PKG_ABI_VERSION in the package makefile. The library filename is fixed up for files installed to packages and to the staging dir. References to the original from executables within the same package are also fixed up Signed-off-by: Felix Fietkau --- rules.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rules.mk') diff --git a/rules.mk b/rules.mk index cbe1b0cb4c..c6bd7327c5 100644 --- a/rules.mk +++ b/rules.mk @@ -339,6 +339,10 @@ else $(SCRIPT_DIR)/rstrip.sh endif +SET_ABI_VERSION= \ + PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \ + $(SCRIPT_DIR)/set-abi-version.sh + ifeq ($(CONFIG_IPV6),y) DISABLE_IPV6:= else @@ -428,6 +432,8 @@ $(shell \ ) endef +abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1)))) + COMMITCOUNT = $(if $(DUMP),0,$(call commitcount)) AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1)) -- cgit v1.2.3