summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2012-12-05 19:36:36 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2012-12-10 21:25:45 (GMT)
commitf7ccd30afbd989085be834b23ac2ea997c50b883 (patch)
tree738eab72f529c80753a89006df060386c564b381
parent36f96dbb7816ddeaa7f0a588f0a54ad8fd7a0ee5 (diff)
downloadbuildroot-f7ccd30afbd989085be834b23ac2ea997c50b883.tar.gz
buildroot-f7ccd30afbd989085be834b23ac2ea997c50b883.tar.bz2
xtensa: add -mlongcalls to CFLAGS for xtensa
The longcalls option allows calls across a greater range of addresses. This option may degrade both code size and performance, but the linker can generally optimize away the unnecessary overhead when a call ends up within range Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/Makefile.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 8dea51e..4281773 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -56,6 +56,15 @@ TARGET_ABI+=-mabi=spe -mfloat-gprs=double -Wa,-me500mc
endif
endif
+# Use longcalls option for Xtensa globally.
+# The 'longcalls' option allows calls across a greater range of addresses,
+# 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.
+ifeq ($(BR2_xtensa),y)
+TARGET_ABI += -mlongcalls
+endif
+
STAGING_DIR=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/sysroot
TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))