diff mbox

[dpdk-dev,v2] mk: add rpath for applications

Message ID 1462287819-24407-1-git-send-email-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show

Commit Message

Ferruh Yigit May 3, 2016, 3:03 p.m. UTC
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@intel.com>
---
 mk/rte.app.mk        | 4 ++++
 scripts/test-null.sh | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Thomas Monjalon May 18, 2016, 2:35 p.m. UTC | #1
2016-05-03 16:03, Ferruh Yigit:
> 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@intel.com>

Applied, thanks
diff mbox

Patch

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index c66e491..0914e4c 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -185,6 +185,10 @@  LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)
 LDLIBS := $(shell echo $(LDLIBS) | \
 	awk '{for (i = 1; i <= NF; i++) { if (!seen[$$i]++) print $$i }}')
 
+ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy)
+LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib
+endif
+
 .PHONY: all
 all: install
 
diff --git a/scripts/test-null.sh b/scripts/test-null.sh
index ef6d800..32a47b1 100755
--- a/scripts/test-null.sh
+++ b/scripts/test-null.sh
@@ -36,7 +36,6 @@  build=${1:-build}
 coremask=${2:-3} # default using cores 0 and 1
 
 if grep -q SHARED_LIB=y $build/.config; then
-	export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH
 	pmd='-d librte_pmd_null.so'
 fi