[dpdk] Fixing some build issues (debuginfo empty, 32 bit build missing)

Neil Horman nhorman at fedoraproject.org
Tue Jul 1 15:10:07 UTC 2014


commit 7a1c5e6a868e4c63bd9e7310238a09a5f5bf1e86
Author: Neil Horman <nhorman at tuxdriver.com>
Date:   Tue Jul 1 11:09:58 2014 -0400

    Fixing some build issues (debuginfo empty, 32 bit build missing)

 dpdk-debug.patch         |    9 +++++++++
 dpdk-link-using-cc.patch |   25 +++++++++++++++++++++++++
 dpdk.spec                |   21 +++++++++++++++++----
 3 files changed, 51 insertions(+), 4 deletions(-)
---
diff --git a/dpdk-debug.patch b/dpdk-debug.patch
new file mode 100644
index 0000000..2191d3a
--- /dev/null
+++ b/dpdk-debug.patch
@@ -0,0 +1,9 @@
+diff -up ./mk/rte.vars.mk.orig ./mk/rte.vars.mk
+--- ./mk/rte.vars.mk.orig	2014-06-30 11:24:24.379944369 -0400
++++ ./mk/rte.vars.mk	2014-06-30 11:24:34.544237841 -0400
+@@ -138,3 +138,5 @@ include $(RTE_SDK)/mk/target/$(RTE_TARGE
+ else
+ include $(RTE_SDK)/mk/target/generic/rte.vars.mk
+ endif
++
++CFLAGS+=-g
diff --git a/dpdk-link-using-cc.patch b/dpdk-link-using-cc.patch
new file mode 100644
index 0000000..9446711
--- /dev/null
+++ b/dpdk-link-using-cc.patch
@@ -0,0 +1,25 @@
+diff -up ./mk/rte.lib.mk.orig ./mk/rte.lib.mk
+--- ./mk/rte.lib.mk.orig	2014-05-29 05:43:11.000000000 -0400
++++ ./mk/rte.lib.mk	2014-07-01 10:21:36.827871451 -0400
+@@ -60,8 +60,10 @@ build: _postbuild
+ 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_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
++O_TO_S = $(CC) $(CPU_LDFLAGS) -z muldefs -shared $(OBJS-y) -o $(LIB)
++else
++O_TO_S = $(LD) $(CPU_LDFLAGS) -z muldefs -shared $(OBJS-y) -o $(LIB)
+ endif
+ 
+ O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
+@@ -73,8 +75,6 @@ O_TO_A_DO = @set -e; \
+ 	$(O_TO_A) && \
+ 	echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
+ 
+-O_TO_S = $(LD) $(CPU_LDFLAGS) -z muldefs -shared $(OBJS-y) -o $(LIB)
+-O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
+ O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)","  LD $(@)")
+ O_TO_S_DO = @set -e; \
+ 	echo $(O_TO_S_DISP); \
diff --git a/dpdk.spec b/dpdk.spec
index 147f015..1c2d918 100644
--- a/dpdk.spec
+++ b/dpdk.spec
@@ -1,4 +1,4 @@
-%global rel 0.9
+%global rel 0.9.1
 
 # As per packaging guidelines, since dpdk is pre-release, this is the git hash
 # that I used with git archive to build the source tarball and the date on which
@@ -21,6 +21,8 @@ Source3: common_linuxapp
 # This can be dropped when upstream makes this configurable
 #
 Patch0: dpdk-1.7.0-igb_uio_disable.patch
+Patch1: dpdk-debug.patch
+Patch2: dpdk-link-using-cc.patch
 
 Summary: Data Plane Development Kit core
 
@@ -36,9 +38,15 @@ License: BSD and LGPLv2 and GPLv2
 # other techniques, carefully crafted x86 assembly instructions.  As such it
 # currently (and likely never will) run on non-x86 platforms
 #
-ExclusiveArch: i386 x86_64 
+ExclusiveArch: %{ix86} x86_64 
+
+%ifarch x86_64
+%global target x86_64-default-linuxapp-gcc
+%else
+%global target i686-default-linuxapp-gcc
+%endif
+
 
-%global target %{_arch}-default-linuxapp-gcc
 %global machine default
 
 BuildRequires: kernel-devel, kernel-headers, libpcap-devel, doxygen
@@ -77,10 +85,12 @@ cp %{SOURCE1} ./config/
 cp %{SOURCE2} ./config/
 cp %{SOURCE3} ./config/
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 # need to enable debuginfo
-export CPU_CFLAGS=-g
+
 make V=1 O=%{target} T=%{target} %{?_smp_mflags} config
 make V=1 O=%{target} %{?_smp_mflags}
 make V=1 O=%{target} %{?_smp_mflags} doc
@@ -130,6 +140,9 @@ cp -a            tools                 %{buildroot}%{datadir}
 %exclude %{docdir}/html
 
 %changelog
+* Tue Jul 01 2014 - Neil Horman <nhorman at tuxdriver.com> - 1.0.7-0.9.1.20140603git5ebbb1728
+- Fixed some build errors (empty debuginfo, bad 32 bit build)
+
 * Wed Jun 11 2014 - Neil Horman <nhorman at tuxdriver.com> - 1.0.7-0.9.20140603git5ebbb1728
 - Fix another build dependency
 


More information about the scm-commits mailing list