DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10
@ 2014-06-24  0:23 Bruce Richardson
  2014-06-24  0:23 ` [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC Bruce Richardson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bruce Richardson @ 2014-06-24  0:23 UTC (permalink / raw)
  To: dev

These two small patches fix minor compilation issues found when testing 
compilation on a FreeBSD 10 system.


Bruce Richardson (2):
  mk: overriding CC also overrides HOSTCC
  bsdapp: disable ACL library compilation

 config/defconfig_x86_64-native-bsdapp-gcc | 5 +++++
 mk/toolchain/gcc/rte.vars.mk              | 4 ++++
 2 files changed, 9 insertions(+)

-- 
1.9.3

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

* [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
  2014-06-24  0:23 [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10 Bruce Richardson
@ 2014-06-24  0:23 ` Bruce Richardson
  2014-06-24  9:38   ` Thomas Monjalon
  2014-06-24  0:23 ` [dpdk-dev] [PATCH 2/2] bsdapp: disable ACL library compilation Bruce Richardson
  2014-06-27  0:47 ` [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10 Thomas Monjalon
  2 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2014-06-24  0:23 UTC (permalink / raw)
  To: dev

when overriding the CC variable on the commandline, the HOSTCC value
was remaining at "gcc", which caused errors on Free BSD10 when using a gcc
as e.g. gcc48, without a binary just called "gcc". This change overrides
HOSTCC when CC is overridden, which means that setting CC=gcc48, will
now also set HOSTCC=gcc48, allowing the "testhost" app to compile on BSD10

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 mk/toolchain/gcc/rte.vars.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
index 58faa39..39005db 100644
--- a/mk/toolchain/gcc/rte.vars.mk
+++ b/mk/toolchain/gcc/rte.vars.mk
@@ -53,7 +53,11 @@ STRIP     = $(CROSS)strip
 READELF   = $(CROSS)readelf
 GCOV      = $(CROSS)gcov
 
+ifeq ("$(origin CC)", "command line")
+HOSTCC    = $(CC)
+else
 HOSTCC    = gcc
+endif
 HOSTAS    = as
 
 TOOLCHAIN_ASFLAGS =
-- 
1.9.3

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

* [dpdk-dev] [PATCH 2/2] bsdapp: disable ACL library compilation
  2014-06-24  0:23 [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10 Bruce Richardson
  2014-06-24  0:23 ` [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC Bruce Richardson
@ 2014-06-24  0:23 ` Bruce Richardson
  2014-06-27  0:47 ` [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10 Thomas Monjalon
  2 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2014-06-24  0:23 UTC (permalink / raw)
  To: dev

Using gcc 4.8 on FreeBSD 10, support for SSE4.x is not detected by
the compiler, meaning that the ACL library, which depends on SSE4.2
cannot compile. Disable this library for the native target allows
compiles to succeed on FreeBSD 10 using gcc.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/defconfig_x86_64-native-bsdapp-gcc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/config/defconfig_x86_64-native-bsdapp-gcc b/config/defconfig_x86_64-native-bsdapp-gcc
index e91738b..9cb6bca 100644
--- a/config/defconfig_x86_64-native-bsdapp-gcc
+++ b/config/defconfig_x86_64-native-bsdapp-gcc
@@ -69,3 +69,8 @@ CONFIG_RTE_ARCH_X86_64=y
 #
 CONFIG_RTE_TOOLCHAIN="gcc"
 CONFIG_RTE_TOOLCHAIN_GCC=y
+
+#
+# gcc doesn't detect sse4.x support correctly on bsd, so disable ACL lib
+#
+CONFIG_RTE_LIBRTE_ACL=n
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
  2014-06-24  0:23 ` [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC Bruce Richardson
@ 2014-06-24  9:38   ` Thomas Monjalon
  2014-06-24 17:22     ` Richardson, Bruce
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2014-06-24  9:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

Hi Bruce,

2014-06-24 01:23, Bruce Richardson:
> when overriding the CC variable on the commandline, the HOSTCC value
> was remaining at "gcc", which caused errors on Free BSD10 when using a gcc
> as e.g. gcc48, without a binary just called "gcc". This change overrides
> HOSTCC when CC is overridden, which means that setting CC=gcc48, will
> now also set HOSTCC=gcc48, allowing the "testhost" app to compile on BSD10

So you are mixing CC and HOSTCC which would break cross-compilation.
Why don't you set HOSTCC on command line?

-- 
Thomas

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

* Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
  2014-06-24  9:38   ` Thomas Monjalon
@ 2014-06-24 17:22     ` Richardson, Bruce
  2014-06-25 17:26       ` Richardson, Bruce
  0 siblings, 1 reply; 7+ messages in thread
From: Richardson, Bruce @ 2014-06-24 17:22 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, June 24, 2014 2:39 AM
> To: Richardson, Bruce
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
> 
> Hi Bruce,
> 
> 2014-06-24 01:23, Bruce Richardson:
> > when overriding the CC variable on the commandline, the HOSTCC value
> > was remaining at "gcc", which caused errors on Free BSD10 when using a gcc
> > as e.g. gcc48, without a binary just called "gcc". This change overrides
> > HOSTCC when CC is overridden, which means that setting CC=gcc48, will
> > now also set HOSTCC=gcc48, allowing the "testhost" app to compile on BSD10
> 
> So you are mixing CC and HOSTCC which would break cross-compilation.
> Why don't you set HOSTCC on command line?
> 

Because I shouldn't need to set HOSTCC unless I am cross compiling and need a different CC and HOSTCC. If my compiler is called "gcc48", and I tell the build system that my compiler is called "gcc48", it should use that value everywhere in place of gcc, unless I also tell it that my HOSTCC should be something completely different. This patch only affects HOSTCC if you specify CC on the command-line to override that value, otherwise things are left as they are. 
If you do want to override CC and do cross compiling with a separate HOSTCC that can be done too, by overriding HOSTCC also, i.e. CC=x HOSTCC=y. For those not cross compiling, they should never need to know about HOSTCC at all.

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

* Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
  2014-06-24 17:22     ` Richardson, Bruce
@ 2014-06-25 17:26       ` Richardson, Bruce
  0 siblings, 0 replies; 7+ messages in thread
From: Richardson, Bruce @ 2014-06-25 17:26 UTC (permalink / raw)
  To: Richardson, Bruce, Thomas Monjalon; +Cc: dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Richardson, Bruce
> Sent: Tuesday, June 24, 2014 10:22 AM
> To: Thomas Monjalon
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
> 
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > Sent: Tuesday, June 24, 2014 2:39 AM
> > To: Richardson, Bruce
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
> >
> > Hi Bruce,
> >
> > 2014-06-24 01:23, Bruce Richardson:
> > > when overriding the CC variable on the commandline, the HOSTCC value
> > > was remaining at "gcc", which caused errors on Free BSD10 when using a gcc
> > > as e.g. gcc48, without a binary just called "gcc". This change overrides
> > > HOSTCC when CC is overridden, which means that setting CC=gcc48, will
> > > now also set HOSTCC=gcc48, allowing the "testhost" app to compile on
> BSD10
> >
> > So you are mixing CC and HOSTCC which would break cross-compilation.
> > Why don't you set HOSTCC on command line?
> >
> 
> Because I shouldn't need to set HOSTCC unless I am cross compiling and need a
> different CC and HOSTCC. If my compiler is called "gcc48", and I tell the build
> system that my compiler is called "gcc48", it should use that value everywhere in
> place of gcc, unless I also tell it that my HOSTCC should be something
> completely different. This patch only affects HOSTCC if you specify CC on the
> command-line to override that value, otherwise things are left as they are.
> If you do want to override CC and do cross compiling with a separate HOSTCC
> that can be done too, by overriding HOSTCC also, i.e. CC=x HOSTCC=y. For those
> not cross compiling, they should never need to know about HOSTCC at all.

Is the above explanation clear enough? Anyone any other comments or care to ack the patch. I think this is really needed to make it easy to use v1.7 on BSD 10, which has no gcc by default.

/Bruce

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

* Re: [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10
  2014-06-24  0:23 [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10 Bruce Richardson
  2014-06-24  0:23 ` [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC Bruce Richardson
  2014-06-24  0:23 ` [dpdk-dev] [PATCH 2/2] bsdapp: disable ACL library compilation Bruce Richardson
@ 2014-06-27  0:47 ` Thomas Monjalon
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2014-06-27  0:47 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

2014-06-24 01:23, Bruce Richardson:
> These two small patches fix minor compilation issues found when testing
> compilation on a FreeBSD 10 system.
> 
> 
> Bruce Richardson (2):
>   mk: overriding CC also overrides HOSTCC
>   bsdapp: disable ACL library compilation

Acked and applied for version 1.7.0.

Thanks
-- 
Thomas

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

end of thread, other threads:[~2014-06-27  0:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-24  0:23 [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10 Bruce Richardson
2014-06-24  0:23 ` [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC Bruce Richardson
2014-06-24  9:38   ` Thomas Monjalon
2014-06-24 17:22     ` Richardson, Bruce
2014-06-25 17:26       ` Richardson, Bruce
2014-06-24  0:23 ` [dpdk-dev] [PATCH 2/2] bsdapp: disable ACL library compilation Bruce Richardson
2014-06-27  0:47 ` [dpdk-dev] [PATCH 0/2] minor compile fixes for FreeBSD 10 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).