[dpdk-dev,v2,2/7] mk: fix external library link

Message ID 1466959325-9426-3-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Thomas Monjalon June 26, 2016, 4:42 p.m. UTC
  When building an external library with rte.extlib.mk, the internal
libraries were not found because the linker search path was the
external library install directory (RTE_OUTPUT/lib).
It is fixed by searching in the internal library install directory
(RTE_SDK_BIN/lib).
When building an internal library, RTE_SDK_BIN = RTE_OUTPUT.

Fixes: c6417ce61f83 ("mk: add build-time library directory to linker path")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index d2523ee..924dfb5 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -93,7 +93,7 @@  O_TO_A_DO = @set -e; \
 	$(O_TO_A) && \
 	echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
 
-O_TO_S = $(LD) -L$(RTE_OUTPUT)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
+O_TO_S = $(LD) -L$(RTE_SDK_BIN)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
 	  -shared $(OBJS-y) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
 O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
 O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)","  LD $(@)")