[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH 1/3] build: Configure the compiler from command line
By default, the compiler is GCC. Use COMPILER=clang with make to configure the compiler as CLANG. Signed-off-by: Alice Suiu <alicesuiu17@xxxxxxxxx> Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx> --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1f309b7d..b3ba38c4 100644 --- a/Makefile +++ b/Makefile @@ -544,11 +544,20 @@ ifneq ("$(origin CROSS_COMPILE)","undefined") CONFIG_CROSS_COMPILE := $(CROSS_COMPILE:"%"=%) endif +# Use 'make COMPILER=clang' to compile with clang +ifeq ("$(origin COMPILER)", "command line") + CONFIG_COMPILER := $(COMPILER) +endif +ifndef CONFIG_COMPILER + 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 |