summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2016-08-30 18:33:10 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2016-08-30 18:33:10 +0100
commitcb54a5c91878b3f92aba4ab02cad63acc3b8999d (patch)
treea47dd052e184b5425a4691e47e3c359503cfbe8b /debian
parente16dc53ad301feeb9701258a6916f049618cd464 (diff)
Import patch to set *CPPFLAGS in upstream's mkfile
Part of fix for: W: dpdk-dev: hardening-no-relro usr/share/dpdk/x86_64-default-linuxapp-gcc/app/dpdk-pmdinfogen Change-Id: I16b05ddb5ca59dc57be462bf756cb25fb5baaf95 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/rte-compile-pre-cppflags.patch43
-rw-r--r--debian/patches/series1
2 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/rte-compile-pre-cppflags.patch b/debian/patches/rte-compile-pre-cppflags.patch
new file mode 100644
index 00000000..c0eef6c1
--- /dev/null
+++ b/debian/patches/rte-compile-pre-cppflags.patch
@@ -0,0 +1,43 @@
+From a4d00a8bf4684a4cf101b026c7c49a993cf9b989 Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <lboccass@brocade.com>
+Date: Tue, 30 Aug 2016 17:01:49 +0100
+Subject: [PATCH] mk: add missing *CPPFLAGS to rte.compile-pre.mk
+
+Some targets in mk/internal/rte.compile-pre.mk are calling CC or
+HOSTCC without passing CPPFLAGS, EXTRA_CPPFLAGS or HOST_CPPFLAGS,
+HOST_EXTRA_CPPFLAGS.
+On Debian/Ubuntu builds this means that preprocessor flags set by the
+dpkg-buildpackage environment, like hardening flags, are not
+correctly passed to all objects builds.
+
+Signed-off-by: Luca Boccassi <lboccass@brocade.com>
+---
+ mk/internal/rte.compile-pre.mk | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/mk/internal/rte.compile-pre.mk
++++ b/mk/internal/rte.compile-pre.mk
+@@ -74,18 +74,18 @@ CMDS-all := $(CMDS-y) $(CMDS-n) $(CMDS-)
+
+ # command to compile a .c file to generate an object
+ ifeq ($(USE_HOST),1)
+-C_TO_O = $(HOSTCC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(HOST_CFLAGS) \
+- $(CFLAGS_$(@)) $(HOST_EXTRA_CFLAGS) -o $@ -c $<
++C_TO_O = $(HOSTCC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(HOST_CPPFLAGS) $(HOST_CFLAGS) \
++ $(CFLAGS_$(@)) $(HOST_EXTRA_CPPFLAGS) $(HOST_EXTRA_CFLAGS) -o $@ -c $<
+ C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
+ C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," HOSTCC $(@)")
+ else
+-C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
+- $(CFLAGS_$(@)) $(EXTRA_CFLAGS) -o $@ -c $<
++C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CPPFLAGS) $(CFLAGS) \
++ $(CFLAGS_$(@)) $(EXTRA_CPPFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<
+ C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
+ C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," CC $(@)")
+ endif
+ PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c
+-PMDINFO_CC = $(CC) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c
++PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c
+ PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
+ PMDINFO_TO_O = if grep -q 'PMD_REGISTER_DRIVER(.*)' $<; then \
+ echo "$(if $V,$(PMDINFO_GEN), PMDINFO $@.pmd.c)" && \
diff --git a/debian/patches/series b/debian/patches/series
index 1a805527..5f583d54 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ fix-double-license-info.patch
fix-unusual-interpreter.patch
dpdk-dev-doc-fix-old-dpdk-nic-bind.py-references.patch
make-load-devel-config-not-to-appear-as-executable.patch
+rte-compile-pre-cppflags.patch