[OpenWrt-Devel] [RFC PATCH] ARM Cortex-A9: build the userspace with Thumb-2 instructions
Rui Salvaterra
rsalvaterra at gmail.com
Fri Jun 19 05:45:25 EDT 2020
Thumb-2 code is denser than pure ARM, reducing RAM usage and improving
performance due to better instruction cache footprint.
There's no reason for not enabling this feature on other ARMv7 targets
(cortex-a7 and cortex-a8), but I don't have the hardware to test it.
Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
include/target.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/target.mk b/include/target.mk
index a2ceb7f783..dfc6f4e480 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -196,6 +196,9 @@ ifeq ($(DUMP),1)
CPU_TYPE = sparc
CPU_CFLAGS_ultrasparc = -mcpu=ultrasparc
endif
+ ifeq ($(ARCH),arm)
+ CPU_CFLAGS_cortex-a9 = -mthumb
+ endif
ifeq ($(ARCH),aarch64)
CPU_TYPE ?= generic
CPU_CFLAGS_generic = -mcpu=generic
--
2.27.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list