shared_lib: add as_needed to the libspdk.so linker script

specifying as_needed in the linker script prevents us from creating more
runtime dependencies than necessary for a given application linking to
libspdk.so

Change-Id: Ifd3788e210c5e6a0e19749cb575c3dfb494a41d2
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/427808
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Seth Howell 2018-10-02 17:30:59 -07:00 committed by Jim Harris
parent 89ef21520d
commit 346fefc364

View File

@ -47,7 +47,7 @@ SPDK_SHARED_LIBS := $(filter-out $(IGNORED_LIBS), $(sort $(notdir $(wildcard $(S
$(SHARED_REALNAME_LIB):
$(Q)echo " SO $(notdir $@)"; \
echo "GROUP ( $(SPDK_SHARED_LIBS) )" > $(SHARED_REALNAME_LIB)
echo "GROUP ( AS_NEEDED ( $(SPDK_SHARED_LIBS) ) )" > $(SHARED_REALNAME_LIB)
$(SHARED_LINKED_LIB) : $(SHARED_REALNAME_LIB)
$(Q)echo " SYMLINK $(notdir $@)"; $(BUILD_LINKERNAME_LIB)