|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [UNIKRAFT PATCH v3 1/3] build: Option to configure the compiler
Awesome, Vlad.
Reviewed-by: Razvan Deaconescu <razvan.deaconescu@xxxxxxxxx>
Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx> writes:
> 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>
> ---
> Makefile | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 3196554..ce3392a 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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |