DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: add missing *CPPFLAGS to rte.compile-pre.mk
@ 2016-08-30 17:25 Luca Boccassi
  2016-09-14 11:06 ` Christian Ehrhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Boccassi @ 2016-08-30 17:25 UTC (permalink / raw)
  To: dev; +Cc: Luca Boccassi

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(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index f740179..7a1a62a 100644
--- 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)" && \
-- 
2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: add missing *CPPFLAGS to rte.compile-pre.mk
  2016-08-30 17:25 [dpdk-dev] [PATCH] mk: add missing *CPPFLAGS to rte.compile-pre.mk Luca Boccassi
@ 2016-09-14 11:06 ` Christian Ehrhardt
  2016-09-23 16:24   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Ehrhardt @ 2016-09-14 11:06 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Tue, Aug 30, 2016 at 7:25 PM, Luca Boccassi <lboccass@brocade.com> wrote:

> 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>
>

Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>


-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: add missing *CPPFLAGS to rte.compile-pre.mk
  2016-09-14 11:06 ` Christian Ehrhardt
@ 2016-09-23 16:24   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-09-23 16:24 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev, Christian Ehrhardt

2016-09-14 13:06, Christian Ehrhardt:
> On Tue, Aug 30, 2016 at 7:25 PM, Luca Boccassi <lboccass@brocade.com> wrote:
> 
> > 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>
> >
> 
> Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-23 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 17:25 [dpdk-dev] [PATCH] mk: add missing *CPPFLAGS to rte.compile-pre.mk Luca Boccassi
2016-09-14 11:06 ` Christian Ehrhardt
2016-09-23 16:24   ` 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).