* [dpdk-dev] [PATCH] mk: add rpath for applications
@ 2016-04-29 16:34 Ferruh Yigit
2016-05-02 16:10 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2016-04-29 16:34 UTC (permalink / raw)
To: dev; +Cc: 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>
---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mk: add rpath for applications
2016-04-29 16:34 [dpdk-dev] [PATCH] mk: add rpath for applications Ferruh Yigit
@ 2016-05-02 16:10 ` Thomas Monjalon
2016-05-03 13:24 ` Ferruh Yigit
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2016-05-02 16:10 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev
2016-04-29 17:34, 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.
Yes it is useful in dev environment, but can be risky or strange when
packaged for production environment.
Shouldn't we have a switch to avoid a development garbage in production?
I suggest to use RTE_DEVEL_BUILD.
> Patch removes requirement to set LD_LIBRARY_PATH variable when DPDK
> compiled as shared library.
Yes, this patch could remove
export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH
in scripts/test-null.sh.
[...]
> +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> +LDFLAGS += --rpath=$(RTE_SDK_BIN)/lib
> +endif
Isn't it -rpath, with a single dash?
As it is a variable setting, it should be added before the rules,
just after LDLIBS settings.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mk: add rpath for applications
2016-05-02 16:10 ` Thomas Monjalon
@ 2016-05-03 13:24 ` Ferruh Yigit
2016-05-03 15:03 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2016-05-03 13:24 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On 5/2/2016 5:10 PM, Thomas Monjalon wrote:
> 2016-04-29 17:34, 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.
>
> Yes it is useful in dev environment, but can be risky or strange when
> packaged for production environment.
> Shouldn't we have a switch to avoid a development garbage in production?
> I suggest to use RTE_DEVEL_BUILD.
>
Right, I will use RTE_DEVEL_BUILD
>> Patch removes requirement to set LD_LIBRARY_PATH variable when DPDK
>> compiled as shared library.
>
> Yes, this patch could remove
> export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH
> in scripts/test-null.sh.
>
Sure, I can update it.
> [...]
>> +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
>> +LDFLAGS += --rpath=$(RTE_SDK_BIN)/lib
>> +endif
>
> Isn't it -rpath, with a single dash?
>
It seems both are working, I will convert to single dash.
> As it is a variable setting, it should be added before the rules,
> just after LDLIBS settings.
>
OK.
I will send an updated version.
Thanks for the review,
ferruh
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] mk: add rpath for applications
2016-05-03 13:24 ` Ferruh Yigit
@ 2016-05-03 15:03 ` Ferruh Yigit
2016-05-18 14:35 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2016-05-03 15:03 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, 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>
---
mk/rte.app.mk | 4 ++++
scripts/test-null.sh | 1 -
2 files changed, 4 insertions(+), 1 deletion(-)
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
--
2.5.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] mk: add rpath for applications
2016-05-03 15:03 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
@ 2016-05-18 14:35 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-05-18 14:35 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-18 14:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 16:34 [dpdk-dev] [PATCH] mk: add rpath for applications Ferruh Yigit
2016-05-02 16:10 ` Thomas Monjalon
2016-05-03 13:24 ` Ferruh Yigit
2016-05-03 15:03 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2016-05-18 14:35 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).