diff options
| author | Markos Chandras <[email protected]> | 2017-02-16 16:17:31 +0000 |
|---|---|---|
| committer | Thomas Monjalon <[email protected]> | 2017-05-01 22:03:37 +0200 |
| commit | 939abaf96a72e31a053c26cd825252e4ba77375f (patch) | |
| tree | 5e323506175233c46fbf87dda3f3ae0d73e7893b | |
| parent | 509f35d4c48434ec5a4a8b60342bf633eea69062 (diff) | |
examples/ethtool: fix link with ixgbe shared lib
When RTE_DEVEL_BUILD is unset, -rpath is unset.
So the ethtool app cannot link with ixgbe shared library
which is required by ethtool lib:
warning: librte_pmd_ixgbe.so.1, needed by
examples/ethtool/lib/x86_64-native-linuxapp-gcc/lib/librte_ethtool.so,
not found (try using -rpath or -rpath-link)
It is fixed by adding the library in the application link.
The library link is also improved to specify that this explicit link
to ixgbe is needed only in the shared lib mode.
Fixes: 077d223e25c3 ("examples/ethtool: use ixgbe public function")
Signed-off-by: Markos Chandras <[email protected]>
Acked-by: Remy Horton <[email protected]>
Acked-by: Timothy Redaelli <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
| -rw-r--r-- | examples/ethtool/ethtool-app/Makefile | 5 | ||||
| -rw-r--r-- | examples/ethtool/lib/Makefile | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 09c66ad194..96abf53b29 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -50,5 +50,10 @@ CFLAGS += $(WERROR_FLAGS) LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib LDLIBS += -lrte_ethtool +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) +ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) +LDLIBS += -lrte_pmd_ixgbe +endif +endif include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile index 197c1d6f58..266babade8 100644 --- a/examples/ethtool/lib/Makefile +++ b/examples/ethtool/lib/Makefile @@ -54,8 +54,10 @@ SRCS-y := rte_ethtool.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) LDLIBS += -lrte_pmd_ixgbe endif +endif include $(RTE_SDK)/mk/rte.extlib.mk |
