Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] xtensa: add -mlongcalls to CFLAGS for xtensa
@ 2012-12-06  5:36 Chris Zankel
  2012-12-10 21:26 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Zankel @ 2012-12-06  5:36 UTC (permalink / raw)
  To: buildroot

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>
---
 package/Makefile.in |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/Makefile.in b/package/Makefile.in
index 9fdc745..98e7f7c 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))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] xtensa: add -mlongcalls to CFLAGS for xtensa
  2012-12-06  5:36 [Buildroot] [PATCH] xtensa: add -mlongcalls to CFLAGS for xtensa Chris Zankel
@ 2012-12-10 21:26 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2012-12-10 21:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Chris" == Chris Zankel <chris@zankel.net> writes:

 Chris> The longcalls option allows calls across a greater range of addresses.
 Chris> This option may degrade both code size and performance, but
 Chris> the linker can generally optimize away the unnecessary overhead
 Chris> when a call ends up within range

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-10 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06  5:36 [Buildroot] [PATCH] xtensa: add -mlongcalls to CFLAGS for xtensa Chris Zankel
2012-12-10 21:26 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox