|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [UNIKRAFT PATCH 1/3] build: Configure the compiler from command line
On 21.11.20 17:34, Vlad-Andrei Badoiu wrote:
I think we should prefer a mechanism that works the same way as CROSS_COMPILE. This approach would be slightly more flexible (.config, environment variable, and command line) and would still cover your command line case:
ifneq ("$(origin COMPILER)","undefined")
CONFIG_COMPILER := $(COMPILER:"%"=%)
endif
We maybe need to add CONFIG_COMPILER to the `unexport` list (like we had
to do for CONFIG_CROSS_COMPILE), but please double-check. It had to do
with our nested sub-make call.
$(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 Btw, the AR and NM commands, are there clang variants available, too? AR := $(CONFIG_CROSS_COMPILE)$(CONFIG_COMPILER)-ar NM := $(CONFIG_CROSS_COMPILE)$(CONFIG_COMPILER)-nmIf I remember correctly, something like this was needed when enabling LTO with gcc.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |