[dpdk-dev] [PATCH] mk: add rpath for applications
Ferruh Yigit
ferruh.yigit at intel.com
Fri Apr 29 18:34:25 CEST 2016
Add default library output folder to the library search folder.
This is useful for development environment, in production environment
DPDK libraries already should be in know locations.
Patch removes requirement to set LD_LIBRARY_PATH variable when DPDK
compiled as shared library.
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
mk/rte.app.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index c66e491..b8715ee 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -198,6 +198,10 @@ build: _postbuild
exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
+ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
+LDFLAGS += --rpath=$(RTE_SDK_BIN)/lib
+endif
+
ifeq ($(LINK_USING_CC),1)
override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
O_TO_EXE = $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \
--
2.5.5
More information about the dev
mailing list