From e9199e82fcd210a64d0c34ebcab78d714dc4b453 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 24 Jun 2014 01:23:03 +0100 Subject: [PATCH] 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 --- 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 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 = -- 2.20.1