]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
build: Move arm64 clang target to architecture's Makefile.uk
authorSimon Kuenzer <simon@unikraft.io>
Fri, 8 Sep 2023 23:43:48 +0000 (01:43 +0200)
committerRazvan Deaconescu <razvand@unikraft.io>
Fri, 20 Oct 2023 16:35:55 +0000 (19:35 +0300)
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 <simon@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1104

Makefile
arch/arm/arm64/Makefile.uk

index 3fc9dad91c9ccb2ae767b34295e4ff5d2f7214da..d258085c435f9f35930748ed326de98e1816c289 100644 (file)
--- 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)
index 53faa629bacf569a754705b923b95f34ca00779b..e80729906a25fbd4f7c43b4f254b9c776182db73 100644 (file)
@@ -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