[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH v5 1/3] build: Option to configure the compiler
By default, the compiler is GCC. Use COMPILER to set the compiler. For example, COMPILER=clang. Signed-off-by: Alice Suiu <alicesuiu17@xxxxxxxxx> Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx> Reviewed-by: Razvan Deaconescu <razvan.deaconescu@xxxxxxxxx> --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d316291..699f12e 100644 --- a/Makefile +++ b/Makefile @@ -513,6 +513,7 @@ ifeq ($(sub_make_exec), 1) ifeq ($(UK_HAVE_DOT_CONFIG),y) # Hide troublesome environment variables from sub processes unexport CONFIG_CROSS_COMPILE +unexport CONFIG_COMPILER #unexport CC #unexport LD #unexport AR @@ -545,11 +546,18 @@ ifneq ("$(origin CROSS_COMPILE)","undefined") CONFIG_CROSS_COMPILE := $(CROSS_COMPILE:"%"=%) endif +ifneq ("$(origin COMPILER)","undefined") + CONFIG_COMPILER := $(COMPILER:"%"=%) +else + CONFIG_COMPILER := gcc +endif + + $(eval $(call verbose_include,$(CONFIG_UK_BASE)/arch/$(UK_FAMILY)/Compiler.uk)) # Make variables (CC, etc...) -LD := $(CONFIG_CROSS_COMPILE)gcc -CC := $(CONFIG_CROSS_COMPILE)gcc +LD := $(CONFIG_CROSS_COMPILE)$(CONFIG_COMPILER) +CC := $(CONFIG_CROSS_COMPILE)$(CONFIG_COMPILER) CPP := $(CC) CXX := $(CPP) GOC := $(CONFIG_CROSS_COMPILE)gccgo-7 -- 2.27.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |