Override all non-default origins for CC/CXX/CPP, not just undefined.

This commit is contained in:
Graydon Hoare 2012-03-28 14:13:00 -07:00
parent 3c398d28a4
commit 45c74f04ab

View File

@ -204,9 +204,15 @@ endif
CFG_INFO := $(info cfg: using $(CFG_C_COMPILER))
ifeq ($(CFG_C_COMPILER),clang)
CC ?= clang
CXX ?= clang++
CPP ?= cpp
ifeq ($(origin CC),default)
CC=clang
endif
ifeq ($(origin CXX),default)
CXX=clang++
endif
ifeq ($(origin CPP),default)
CPP=cpp
endif
CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -g
CFG_GCCISH_LINK_FLAGS += -g
CFG_DEPEND_C = $(CFG_GCCISH_CROSS)$(CXX) $(CFG_GCCISH_CFLAGS) -MT "$(1)" \
@ -229,9 +235,15 @@ ifeq ($(CFG_C_COMPILER),clang)
$(eval $(call CFG_MAKE_CC,$(target))))
else
ifeq ($(CFG_C_COMPILER),gcc)
CC ?= gcc
CXX ?= g++
CPP ?= cpp
ifeq ($(origin CC),default)
CC=gcc
endif
ifeq ($(origin CXX),default)
CXX=g++
endif
ifeq ($(origin CPP),default)
CPP=cpp
endif
CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -g
CFG_GCCISH_LINK_FLAGS += -g
CFG_DEPEND_C = $(CFG_GCCISH_CROSS)$(CXX) $(CFG_GCCISH_CFLAGS) -MT "$(1)" \