mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-15 06:57:12 +00:00
Enable use of 'check_abi' in build system
This patch invokes the 'check_abi' tool for each shared library that implements an ABI. Issue #2639
This commit is contained in:
parent
b7fffb1b24
commit
80ef5fa73c
@ -13,6 +13,9 @@ INC_DIR += $(DIR)/include
|
||||
INC_DIR += $(BASE_DIR)/src/include
|
||||
LD_OPT += -Bsymbolic-functions --version-script=symbol.map
|
||||
|
||||
# enable use of 'check_abi'
|
||||
SYMBOLS := $(BASE_DIR)/lib/symbols/ld
|
||||
|
||||
#
|
||||
# Generate symbol map from the ABI
|
||||
#
|
||||
|
@ -138,6 +138,17 @@ else
|
||||
LIB_A := $(addsuffix .lib.a,$(LIB))
|
||||
endif
|
||||
|
||||
#
|
||||
# Whenever an ABI is defined for a shared library, we check the consistency
|
||||
# between both by invoking the 'check_abi' tool via the 'LIB_CHECKED'
|
||||
# dependency.
|
||||
#
|
||||
ifneq ($(LIB_SO),)
|
||||
ifneq ($(ABI_SO),)
|
||||
LIB_CHECKED := $(addsuffix .lib.checked,$(LIB))
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Trigger the creation of the <libname>.lib.a or <libname>.lib.so file
|
||||
#
|
||||
@ -153,7 +164,7 @@ all: $(LIB_TAG)
|
||||
#
|
||||
$(LIB_TAG) $(OBJECTS): $(HOST_TOOLS)
|
||||
|
||||
$(LIB_TAG): $(LIB_A) $(LIB_SO) $(ABI_SO) $(INSTALL_SO) $(DEBUG_SO)
|
||||
$(LIB_TAG): $(LIB_A) $(LIB_SO) $(LIB_CHECKED) $(ABI_SO) $(INSTALL_SO) $(DEBUG_SO)
|
||||
@touch $@
|
||||
|
||||
#
|
||||
@ -248,6 +259,9 @@ $(ABI_SO): $(LIB).symbols.o
|
||||
$(LIB_SO_DEPS) $< \
|
||||
--end-group --no-whole-archive
|
||||
|
||||
$(LIB_CHECKED): $(LIB_SO)
|
||||
$(VERBOSE)$(BASE_DIR)/../../tool/check_abi $(LIB_SO) $(SYMBOLS)
|
||||
|
||||
$(LIB_SO).stripped: $(LIB_SO)
|
||||
$(VERBOSE)$(STRIP) -o $@ $<
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user