From: Bruce Richardson Date: Tue, 24 Jun 2014 00:23:03 +0000 (+0100) Subject: mk: override HOSTCC when overriding CC X-Git-Tag: spdx-start~10578 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e9199e82fcd210a64d0c34ebcab78d714dc4b453;p=dpdk.git mk: override HOSTCC when overriding CC 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 Acked-by: Thomas Monjalon --- diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 58faa39b07..39005db105 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 =