All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] ruby: fix 'pcrel too far' build problem on SuperH architectures
@ 2013-10-13  8:04 Thomas De Schampheleire
  0 siblings, 0 replies; only message in thread
From: Thomas De Schampheleire @ 2013-10-13  8:04 UTC (permalink / raw)
  To: buildroot

The 'pcrel too far' problem detected in the autobuild on SuperH
architectures, seems to be caused by the -Os optimization flag. Using
standard optimization fixes the problem.

Fixes http://autobuild.buildroot.net/results/bc36e051e06f596c2fafdd3cc3745bb34b73ace3/

Investigated-by: Lionel Orry <lionel.orry@gmail.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
v2: don't try to be smarter than you are (don't change TARGET_CFLAGS)

 package/ruby/ruby.mk |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk
--- a/package/ruby/ruby.mk
+++ b/package/ruby/ruby.mk
@@ -15,6 +15,13 @@ HOST_RUBY_CONF_OPT = --disable-install-d
 RUBY_LICENSE = Ruby or BSD-2c, BSD-3c, others
 RUBY_LICENSE_FILES = LEGAL COPYING BSDL
 
+# With some SuperH toolchains (like Sourcery CodeBench 2012.09), ruby fails to
+# build with 'pcrel too far'. This seems to be caused by the -Os option we pass
+# by default. To fix the problem, use standard -O2 optimization instead.
+ifeq ($(BR2_sh)$(BR2_sh64),y)
+RUBY_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O2"
+endif
+
 # Force optionals to build before we do
 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
 	RUBY_DEPENDENCIES += berkeleydb

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-13  8:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-13  8:04 [Buildroot] [PATCH v2] ruby: fix 'pcrel too far' build problem on SuperH architectures Thomas De Schampheleire

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.