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
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)
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