From: Chris Zankel <chris@zankel.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] xtensa: add config option to enable longcalls option
Date: Mon, 3 Dec 2012 00:58:46 -0800 [thread overview]
Message-ID: <50bc6a34.45e8440a.493d.4091@mx.google.com> (raw)
The longcalls option allows calls across a greater range of addresses.
This option should be used when call targets can potentially be
out of range. It may degrade both code size and performance, but
the linker can generally optimize away the unnecessary overhead
when a call ends up within range.
This option is enabled by default.
Signed-off-by: Chris Zankel <chris@zankel.net>
---
arch/Config.in.xtensa | 17 +++++++++++++++++
package/Makefile.in | 6 ++++++
2 files changed, 23 insertions(+)
diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa
index 60c03f5..a979108 100644
--- a/arch/Config.in.xtensa
+++ b/arch/Config.in.xtensa
@@ -35,3 +35,20 @@ config BR2_XTENSA_OVERLAY_DIR
config BR2_ARCH
default "xtensa" if BR2_xtensa
+
+menu "Target build options"
+
+config BR2_XTENSA_LONGCALLS
+ bool "Enable longcalls option"
+ default y
+ help
+ Enable or disable transformation of call instructions to allow
+ calls across a greater range of addresses.
+ This option should be used when call targets can potentially be
+ out of range. It may degrade both code size and performance, but
+ the linker can generally optimize away the unnecessary overhead
+ when a call ends up within range.
+
+ Should be enabled by default.
+
+endmenu
diff --git a/package/Makefile.in b/package/Makefile.in
index 9fdc745..b52d5e0 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -56,6 +56,12 @@ TARGET_ABI+=-mabi=spe -mfloat-gprs=double -Wa,-me500mc
endif
endif
+# Xtensa: The 'longcalls' option is required for large binary packages.
+# Use a global option for all packages for now.
+ifeq ($(BR2_XTENSA_LONGCALLS),y)
+TARGET_CFLAGS += -mlongcalls
+endif
+
STAGING_DIR=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/sysroot
TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
--
1.7.9.5
next reply other threads:[~2012-12-03 8:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 8:58 Chris Zankel [this message]
2012-12-03 13:09 ` [Buildroot] [PATCH v2] xtensa: add config option to enable longcalls option Thomas Petazzoni
2012-12-04 8:36 ` czankel
2012-12-04 9:17 ` Thomas Petazzoni
2012-12-04 20:13 ` Peter Korsgaard
2012-12-04 20:40 ` Chris Zankel
2012-12-04 21:39 ` Thomas Petazzoni
2012-12-04 21:55 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50bc6a34.45e8440a.493d.4091@mx.google.com \
--to=chris@zankel.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.