[dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC

Bruce Richardson bruce.richardson at intel.com
Tue Jun 24 02:23:03 CEST 2014


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



More information about the dev mailing list