aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Max Filippov <jcmvbkbc@gmail.com>2014-03-30 21:57:46 +0400
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-03 21:35:21 +0200
commitc6277e4b3130543308222d1ebc9c2916b9eed1a6 (patch)
tree60c3bcda833db5ae2bf8d98d1c0de3527c5aa15e
parent1b1b8fbca7469faef3d42d662b090722ae1c98bf (diff)
downloadbuildroot-c6277e4b3130543308222d1ebc9c2916b9eed1a6.tar.gz
buildroot-c6277e4b3130543308222d1ebc9c2916b9eed1a6.tar.bz2
Makefile.in: add -mtext-section-literals to xtensa ABI
Collecting literals into separate section can be advantageous if that section is placed into DTCM at link time. This is applicable for code running on bare metal, but makes no sense under linux, where userspace is isolated from the physical memory details. OTOH placing literals into separate section breaks build of huge source files, because l32r instruction can only access literals in 256 KBytes range. Add -mtext-section-literals into xtensa ABI to fix build issues of packages with huge sources. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/Makefile.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 454f61442a..986760cb9b 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -72,8 +72,17 @@ endif
# and is required for some packages. While this option can degrade both
# code size and performance, the linker can usually optimize away the
# overhead when a call ends up within a certain range.
+#
+# Use text-section-literals for Xtensa globally.
+# Collecting literals into separate section can be advantageous if that
+# section is placed into DTCM at link time. This is applicable for code
+# running on bare metal, but makes no sense under linux, where userspace
+# is isolated from the physical memory details. OTOH placing literals into
+# separate section breaks build of huge source files, because l32r
+# instruction can only access literals in 256 KBytes range.
+#
ifeq ($(BR2_xtensa),y)
-TARGET_ABI += -mlongcalls
+TARGET_ABI += -mlongcalls -mtext-section-literals
endif
STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot