build: force shared library dependencies
We use some implicit depdendencies in our subsystem libraries. With at least some linkers, these dependencies are not written into the shared library file if there is no actual symbol dependency found. So use --no-as-needed to ensure the dependencies stick. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Idb476efb50b00ff04f5640b4e5a1362a1f096fa7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4796 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: <dongx.yi@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
This commit is contained in:
parent
5568355eb0
commit
c94c546e00
@ -272,7 +272,7 @@ define spdk_build_realname_shared_lib
|
||||
-Wl,--soname,$(notdir $@) \
|
||||
-Wl,--whole-archive $(1) -Wl,--no-whole-archive \
|
||||
-Wl,--version-script=$(2) \
|
||||
$(3)
|
||||
$(3) -Wl,--no-as-needed $(4) -Wl,--as-needed
|
||||
endef
|
||||
|
||||
BUILD_LINKERNAME_LIB=\
|
||||
|
@ -91,7 +91,7 @@ $(SHARED_LINKED_LIB): $(SHARED_REALNAME_LIB)
|
||||
|
||||
$(SHARED_REALNAME_LIB): $(LIB)
|
||||
$(Q)echo " SO $(notdir $@)"; \
|
||||
$(call spdk_build_realname_shared_lib,$^,$(SPDK_MAP_FILE),$(LOCAL_SYS_LIBS) $(SPDK_DEP_LIBS))
|
||||
$(call spdk_build_realname_shared_lib,$^,$(SPDK_MAP_FILE),$(LOCAL_SYS_LIBS),$(SPDK_DEP_LIBS))
|
||||
|
||||
$(LIB): $(OBJS)
|
||||
$(LIB_C)
|
||||
|
Loading…
Reference in New Issue
Block a user