34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
Description: build: Fix linkage of combined shared library
|
|
Currently the build for the combined shared library does not store
|
|
its own dependencies. Forcing consumers of the .so to know about internal
|
|
dependencies and adding them as -l in their compile.
|
|
This patch adds the correct linkage for the currently packaged library
|
|
Forwarded: No, upstream will solve it for DPDK 2.3 via linker script
|
|
Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
|
Last-Update: 2016-02-24
|
|
|
|
--- a/mk/rte.sharelib.mk
|
|
+++ b/mk/rte.sharelib.mk
|
|
@@ -51,12 +51,20 @@ sharelib: $(LIB_ONE) FORCE
|
|
|
|
OBJS = $(wildcard $(RTE_OUTPUT)/build/lib/*.o)
|
|
|
|
+# fix linkage of combined shared library, so that app linking against it don't
|
|
+# need to know the internal dependencies.
|
|
+# Derived from a test run of mk/rtc.app.mk _LDLIBS-y and EXECENV_LDLIBS
|
|
+# static until moving to linker script see LP: 1547517 and LP: 1546547 for more
|
|
+# This fixes only the build path the ubuntu packaging currently passes
|
|
+MISSINGLINKAGE = -lpcap -lxenstore -lpthread $(EXECENV_LDLIBS)
|
|
+
|
|
ifeq ($(LINK_USING_CC),1)
|
|
# Override the definition of LD here, since we're linking with CC
|
|
LD := $(CC) $(CPU_CFLAGS)
|
|
O_TO_S = $(LD) $(call linkerprefix,$(CPU_LDFLAGS)) \
|
|
$(call linkerprefix,$(COMBINED_LDFLAGS)) \
|
|
- -shared $(OBJS) -Wl,-soname,$(LIB_ONE) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
|
|
+ -shared $(OBJS) $(MISSINGLINKAGE) \
|
|
+ -Wl,-soname,$(LIB_ONE) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
|
|
else
|
|
O_TO_S = $(LD) $(CPU_LDFLAGS) $(COMBINED_LDFLAGS) \
|
|
-shared $(OBJS) -Wl,-soname,$(LIB_ONE) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
|