summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2017-11-23 23:41:24 +0000
committerGitHub <noreply@github.com>2017-11-23 23:41:24 +0000
commit71f8a6a9b0cdfcc773542844e1fcb89ba93bcbf5 (patch)
tree19c1299ef5fc877d4982f14f881f49cfe35a05c2 /Makefile
parent1c64838d4b0e061f22b1b31b8fd64ea4510e1ded (diff)
parent1d791530d0f3a4a02e285a38f35fecac4feec70c (diff)
Merge pull request #1145 from etienne-lms/rfc-armv7-2
Support ARMv7 architectures
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 9894c5c8..d186e8b1 100644
--- a/Makefile
+++ b/Makefile
@@ -126,20 +126,28 @@ OD := ${CROSS_COMPILE}objdump
NM := ${CROSS_COMPILE}nm
PP := ${CROSS_COMPILE}gcc -E
+ifeq (${ARM_ARCH_MAJOR},7)
+target32-directive = -target arm-none-eabi
+# Will set march32-directive from platform configuration
+else
+target32-directive = -target armv8a-none-eabi
+march32-directive = -march armv8-a
+endif
+
ifeq ($(notdir $(CC)),armclang)
-TF_CFLAGS_aarch32 = -target arm-arm-none-eabi -march=armv8-a
+TF_CFLAGS_aarch32 = -target arm-arm-none-eabi $(march32-directive)
TF_CFLAGS_aarch64 = -target aarch64-arm-none-eabi -march=armv8-a
else ifneq ($(findstring clang,$(notdir $(CC))),)
-TF_CFLAGS_aarch32 = -target armv8a-none-eabi
+TF_CFLAGS_aarch32 = $(target32-directive)
TF_CFLAGS_aarch64 = -target aarch64-elf
else
-TF_CFLAGS_aarch32 = -march=armv8-a
+TF_CFLAGS_aarch32 = $(march32-directive)
TF_CFLAGS_aarch64 = -march=armv8-a
endif
TF_CFLAGS_aarch64 += -mgeneral-regs-only -mstrict-align
-ASFLAGS_aarch32 = -march=armv8-a
+ASFLAGS_aarch32 = $(march32-directive)
ASFLAGS_aarch64 = -march=armv8-a
CPPFLAGS = ${DEFINES} ${INCLUDES} -nostdinc \
@@ -263,6 +271,10 @@ include ${PLAT_MAKEFILE_FULL}
$(eval $(call MAKE_PREREQ_DIR,${BUILD_PLAT}))
+ifeq (${ARM_ARCH_MAJOR},7)
+include make_helpers/armv7-a-cpus.mk
+endif
+
# Platform compatibility is not supported in AArch32
ifneq (${ARCH},aarch32)
# If the platform has not defined ENABLE_PLAT_COMPAT, then enable it by default