ruby: fix 'pcrel too far' build problem on SuperH architectures
PATCH v3 1/1 ruby: fix 'pcrel too far' build problem on SuperH architectures
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/
---
v3: use intermediate RUBY_CFLAGS variable (thanks ThomasP)
v2: don't try to be smarter than you are (don't change TARGET_CFLAGS)
package/ruby/ruby.mk | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
package/ruby/ruby.mk +9 -0
@@ -15,6 +15,15 @@ HOST_RUBY_CONF_OPT = --disable-install-d RUBY_LICENSE = Ruby or BSD-2c, BSD-3c, others RUBY_LICENSE_FILES = LEGAL COPYING BSDL +RUBY_CFLAGS = $(TARGET_CFLAGS) +# 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_CFLAGS += -O2 +endif +RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)" + # Force optionals to build before we do ifeq ($(BR2_PACKAGE_BERKELEYDB),y) RUBY_DEPENDENCIES += berkeleydb
PATCH v3 1/1 ruby: fix 'pcrel too far' build problem on SuperH architectures
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
Thomas> The 'pcrel too far' problem detected in the autobuild on SuperH Thomas> architectures, seems to be caused by the -Os optimization flag. Using Thomas> standard optimization fixes the problem.
Thomas> Fixes http://autobuild.buildroot.net/results/bc36e051e06f596c2fafdd3cc3745bb34b73ace3/
Thomas> Investigated-by: Lionel Orry <[email protected]>
Thomas> Signed-off-by: Thomas De Schampheleire <[email protected]>
Thomas> ---
Thomas> v3: use intermediate RUBY_CFLAGS variable (thanks ThomasP) Thomas> v2: don't try to be smarter than you are (don't change TARGET_CFLAGS)
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard