[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH] build: assign CONFIG_CROSS_COMPILE according to priority
Assign CONFIG_CROSS_COMPILE to CROSS_COMPILE only if CROSS_COMPILE is defined, so that CONFIG_CROSS_COMPILE will not be erased in case it was set in `.config` Signed-off-by: Dafna Hirschfeld <dafna3@xxxxxxxxx> --- Makefile | 3 +++ arch/arm/arm/Compiler.uk | 2 +- arch/arm/arm64/Compiler.uk | 2 +- arch/x86/x86_64/Compiler.uk | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 96be2db..8316c45 100644 --- a/Makefile +++ b/Makefile @@ -392,7 +392,10 @@ unexport MACHINE # "make" in the configured kernel build directory always uses that. # Default value for CONFIG_CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CONFIG_CROSS_COMPILE in their arch/*/Makefile.uk + +ifneq ("$(origin CROSS_COMPILE)","undefined") CONFIG_CROSS_COMPILE := $(CROSS_COMPILE:"%"=%) +endif include $(CONFIG_UK_BASE)/arch/$(UK_FAMILY)/Compiler.uk diff --git a/arch/arm/arm/Compiler.uk b/arch/arm/arm/Compiler.uk index 44a497d..ae60913 100644 --- a/arch/arm/arm/Compiler.uk +++ b/arch/arm/arm/Compiler.uk @@ -1,5 +1,5 @@ # set cross compile -ifeq ($(CONFIG_CROSS_COMPILE),) +ifeq ($(filter-out "",$(CONFIG_CROSS_COMPILE)),) ifneq ($(CONFIG_UK_ARCH),$(HOSTARCH)) CONFIG_CROSS_COMPILE := arm-linux-gnueabihf- endif diff --git a/arch/arm/arm64/Compiler.uk b/arch/arm/arm64/Compiler.uk index 4572013..016b26b 100644 --- a/arch/arm/arm64/Compiler.uk +++ b/arch/arm/arm64/Compiler.uk @@ -1,5 +1,5 @@ # set cross compile -ifeq ($(CONFIG_CROSS_COMPILE),) +ifeq ($(filter-out "",$(CONFIG_CROSS_COMPILE)),) ifneq ($(CONFIG_UK_ARCH),$(HOSTARCH)) CONFIG_CROSS_COMPILE := aarch64-linux-gnu- endif diff --git a/arch/x86/x86_64/Compiler.uk b/arch/x86/x86_64/Compiler.uk index 98ea8ad..47edc9b 100644 --- a/arch/x86/x86_64/Compiler.uk +++ b/arch/x86/x86_64/Compiler.uk @@ -1,5 +1,5 @@ # set cross compile -ifeq ($(CONFIG_CROSS_COMPILE),) +ifeq ($(filter-out "",$(CONFIG_CROSS_COMPILE)),) ifneq ($(CONFIG_UK_ARCH),$(HOSTARCH)) CONFIG_CROSS_COMPILE := x86_64-linux-gnu- endif -- 2.17.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |