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>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
READELF = $(CROSS)readelf
GCOV = $(CROSS)gcov
+ifeq ("$(origin CC)", "command line")
+HOSTCC = $(CC)
+else
HOSTCC = gcc
+endif
HOSTAS = as
TOOLCHAIN_ASFLAGS =