mk: fix external library link
authorThomas Monjalon <thomas.monjalon@6wind.com>
Sat, 25 Jun 2016 11:07:32 +0000 (13:07 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 29 Jun 2016 11:33:01 +0000 (13:33 +0200)
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

index d2523ee..924dfb5 100644 (file)
@@ -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 $(@)")