From: Simon Kuenzer Date: Fri, 8 Sep 2023 23:43:48 +0000 (+0200) Subject: build: Move arm64 clang target to architecture's Makefile.uk X-Git-Tag: RELEASE-0.15.0~8 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d81b936c0faffab7cbf085003bcf005b0a39ac16;p=unikraft%2Funikraft.git build: Move arm64 clang target to architecture's Makefile.uk This commit moves setting of special ARCHFLAGS and ISR_ARCHFLAGS for arm64 with clang compilers from the main Makefile to the architecture's `Makefile.uk` at `arch/arm/arm64/Makefile.uk`. The original feature was introduced with: Commit 55255f470592d ("Makfile: Add target flags for `clang` with `AArch64`") Signed-off-by: Simon Kuenzer Reviewed-by: Cezar Craciunoiu Reviewed-by: Michalis Pappas Reviewed-by: Maria Sfiraiala Approved-by: Razvan Deaconescu GitHub-Closes: #1104 --- diff --git a/Makefile b/Makefile index 3fc9dad91..d258085c4 100644 --- a/Makefile +++ b/Makefile @@ -675,13 +675,6 @@ CC_VER_MAJOR := $(word 2,$(subst ., ,$(CC_INFO))) CC_VER_MINOR := $(word 3,$(subst ., ,$(CC_INFO))) CC_VERSION := $(CC_VER_MAJOR).$(CC_VER_MINOR) -ifeq ($(call have_clang),y) -ifeq ("$(ARCH)", "arm64") -ARCHFLAGS += --target=aarch64-none-elf -ISR_ARCHFLAGS += --target=aarch64-none-elf -endif -endif - ASFLAGS += -DCC_VERSION=$(CC_VERSION) CFLAGS += -DCC_VERSION=$(CC_VERSION) CXXFLAGS += -DCC_VERSION=$(CC_VERSION) diff --git a/arch/arm/arm64/Makefile.uk b/arch/arm/arm64/Makefile.uk index 53faa629b..e80729906 100644 --- a/arch/arm/arm64/Makefile.uk +++ b/arch/arm/arm64/Makefile.uk @@ -14,6 +14,9 @@ ARCHFLAGS-$(call gcc_version_ge,9,4) += -mno-outline-atomics ISR_ARCHFLAGS += -D__ARM_64__ -mgeneral-regs-only ISR_ARCHFLAGS-$(call gcc_version_ge,9,4) += -mno-outline-atomics +ARCHFLAGS-$(call have_clang) += --target=aarch64-none-elf +ISR_ARCHFLAGS-$(call have_clang) += --target=aarch64-none-elf + CINCLUDES += -I$(CONFIG_UK_BASE)/arch/arm/arm64/include ASINCLUDES += -I$(CONFIG_UK_BASE)/arch/arm/arm64/include CXXINCLUDES += -I$(CONFIG_UK_BASE)/arch/arm/arm64/include