From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: [PATCH 1/2] mk: overriding CC also overrides HOSTCC Date: Tue, 24 Jun 2014 01:23:03 +0100 Message-ID: <1403569384-16758-2-git-send-email-bruce.richardson@intel.com> References: <1403569384-16758-1-git-send-email-bruce.richardson@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1403569384-16758-1-git-send-email-bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 --- 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