[meta-intel] [master][PATCH 3/3] meta-isg: dpdk: fix compilation with dynamic libs

Rahul Kumar Gupta rahul.kumarxx.gupta at intel.com
Fri Jul 22 06:52:09 PDT 2016


Ensure that the correct CFLAGS are passed to LD when compiling rte libs
as shared.
For building the dpdk with config CONFIG_RTE_BUILD_SHARED_LIB=y

Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta at intel.com>
---
 meta-isg/common/recipes-extended/dpdk/dpdk.inc     |  1 +
 ...04-dpdk-fix-compilation-with-dynamic-libs.patch | 30 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch

diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
index b1b56c9..6f3593b 100644
--- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
@@ -9,6 +9,7 @@ SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \
 	   file://dpdk-16.04-point-to-the-right-include-and-lib-path.patch \
 	   file://dpdk-16.04-Fix-for-misleading-indentation-error.patch \
 	   file://dpdk-16.04-dpdk-fix-installation-warning-and-issue.patch \
+	   file://dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch \
 	  "
 
 COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64"
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch
new file mode 100644
index 0000000..4254d07
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch
@@ -0,0 +1,30 @@
+From 8ce0e3249942a90f733bb2113e70e5a90ae67b00 Mon Sep 17 00:00:00 2001
+From: Rahul Kumar Gupta <rahul.kumarxx.gupta at intel.com>
+Date: Thu, 21 Jul 2016 05:53:52 +0800
+Subject: [PATCH 1/2] dpdk: fix compilation with dynamic libs
+
+Upstream-Status: Inappropriate [Configuration]
+
+Ensure that the correct cflags are being used.
+
+Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta at intel.com>
+---
+ mk/rte.lib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
+index 8f7e021..42610c9 100644
+--- a/mk/rte.lib.mk
++++ b/mk/rte.lib.mk
+@@ -70,7 +70,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
+ 
+ ifeq ($(LINK_USING_CC),1)
+ # Override the definition of LD here, since we're linking with CC
+-LD := $(CC) $(CPU_CFLAGS)
++LD := $(CC) $(CPU_CFLAGS) $(EXTRA_CFLAGS)
+ _CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
+ override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
+ else
+-- 
+1.9.1
+
-- 
1.9.1



More information about the meta-intel mailing list