From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Mon, 3 Dec 2012 14:09:12 +0100 Subject: [Buildroot] [PATCH v2] xtensa: add config option to enable longcalls option In-Reply-To: <50bc6a34.45e8440a.493d.4091@mx.google.com> References: <50bc6a34.45e8440a.493d.4091@mx.google.com> Message-ID: <20121203140912.1e09f0ea@skate> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Dear Chris Zankel, On Mon, 3 Dec 2012 00:58:46 -0800, Chris Zankel wrote: > 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 > --- > 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 Do we really want that as a configurable option? Isn't it possible instead to always generate longcalls, or to fix this on a per-package basis, when needed? Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com