minor compile fixes for FreeBSD 10
cover minor compile fixes for FreeBSD 10
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(+)
Signature · 1 line
1.9.3
PATCH 1/2 mk: overriding CC also overrides HOSTCC
In reply to a message not in the archivewhen 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
--- mk/toolchain/gcc/rte.vars.mk | 4 ++++ 1 file changed, 4 insertions(+)
mk/toolchain/gcc/rte.vars.mk +4 -0
@@ -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 =
Signature · 1 line
1.9.3
PATCH 2/2 bsdapp: disable ACL library compilation
In reply to a message not in the archiveUsing 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.
--- config/defconfig_x86_64-native-bsdapp-gcc | 5 +++++ 1 file changed, 5 insertions(+)
config/defconfig_x86_64-native-bsdapp-gcc +5 -0
@@ -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
Signature · 1 line
1.9.3
Re: [PATCH 1/2] mk: overriding CC also overrides HOSTCC
In reply to a message not in the archiveHi Bruce,
2014-06-24 01:23, Bruce Richardson:
Quoted 5 lines
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?
Signature · 1 line
Thomas
Re: [PATCH 1/2] mk: overriding CC also overrides HOSTCC
Quoted 10 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, June 24, 2014 2:39 AM
To: Richardson, Bruce
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCCHi Bruce,
2014-06-24 01:23, Bruce Richardson:
Quoted 9 lines
Quoted 5 lines
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.
Re: [PATCH 1/2] mk: overriding CC also overrides HOSTCC
In reply to a message not in the archiveQuoted 28 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Richardson, Bruce
Sent: Tuesday, June 24, 2014 10:22 AM
To: Thomas Monjalon
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCCQuoted 7 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, June 24, 2014 2:39 AM
To: Richardson, Bruce
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCCQuoted 8 lines
Hi Bruce,
2014-06-24 01:23, Bruce Richardson:
Quoted 5 lines
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
Quoted 4 lines
So you are mixing CC and HOSTCC which would break cross-compilation. Why don't you set HOSTCC on command line?
Quoted 9 lines
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
2014-06-24 01:23, Bruce Richardson:
Quoted 7 lines
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
Signature · 1 line
Thomas