aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-08-08 16:28:43 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-08-30 09:21:53 +0100
commit8fd9d4d58a2f1af37fd1e3e71ee9d81f50c67684 (patch)
treec4a0f2732455e47165fed2095b28c63ca4912e59 /Makefile
parent2a7c9e15c23b376121747ccae78bef91db6225ba (diff)
downloadtrusted-firmware-a-8fd9d4d58a2f1af37fd1e3e71ee9d81f50c67684.tar.gz
Allow manually setting the AArch32 instruction set
At the moment the AArch32 instruction set isn't specified in the command line, which means that the compiler is free to choose the one it sees fit. This decision may change between compiler versions, so it is better to specify it manually. The build option AARCH32_INSTRUCTION_SET has been introduced for this reason. This option can be set to T32 or A32 to pass the correct flags to the compiler. The current behaviour is to default to T32 due to it's smaller size. Change-Id: I02297eb1d9404b5868ff7c054fbff9b3cda7fdb6 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bdc317b190..105233b62c 100644
--- a/Makefile
+++ b/Makefile
@@ -166,6 +166,14 @@ TF_CFLAGS_aarch64 = -march=armv8-a
LD = $(LINKER)
endif
+ifeq (${AARCH32_INSTRUCTION_SET},A32)
+TF_CFLAGS_aarch32 += -marm
+else ifeq (${AARCH32_INSTRUCTION_SET},T32)
+TF_CFLAGS_aarch32 += -mthumb
+else
+$(error Error: Unknown AArch32 instruction set ${AARCH32_INSTRUCTION_SET})
+endif
+
TF_CFLAGS_aarch32 += -mno-unaligned-access
TF_CFLAGS_aarch64 += -mgeneral-regs-only -mstrict-align