Skip to contentSkip to conversation

ruby: do not overwrite RUBY_CONF_ENV

PATCH New Thomas Petazzoni 2 participants 4 messages Nov 9, 2015 – Nov 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ruby: do not overwrite RUBY_CONF_ENV

In commit 53bf889cdca77979814bc6b74170e2f104fc3b70 ("ruby: should not use dl_iterate_phdr() on Blackfin") we added ac_cv_func_dl_iterate_phdr=no to RUBY_CONF_ENV when building on the Blackfin architecture.

However, while doing so, we overwrote the previous value of RUBY_CONF_ENV, which was defined to have custom CFLAGS:

RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)"

This has no visible effect because the custom CFLAGS are only used on SuperH/SuperH 64, while the overwrite of RUBY_CONF_ENV takes place on Blackfin.

However, it doesn't look very pretty, and future additions to RUBY_CONF_ENV may break this subtle behavior.

---
 package/ruby/ruby.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/ruby/ruby.mk +1 -1
index 243cd0b..298493c 100644
@@ -30,7 +30,7 @@ endif
 RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)"
 
 ifeq ($(BR2_bfin),y)
-RUBY_CONF_ENV = ac_cv_func_dl_iterate_phdr=no
+RUBY_CONF_ENV += ac_cv_func_dl_iterate_phdr=no
 # Blackfin doesn't have FFI closure support, needed by the fiddle
 # extension.
 RUBY_CONF_OPTS += --with-out-ext=fiddle
Signature · 1 line
2.6.3
#1 lore raw

PATCH 2/2 ruby: explicitly disable SSP support

The SSP support checks of the Ruby configure script do not do a full link, and therefore don't properly detect if SSP support is fully functional or not, which causes some build failures if the compiler supports -fstack-protector but the C library does not provide the SSP implementation.

To avoid this, we explicitly tell ruby if SSP support is available or not.

Fixes:

http://autobuild.buildroot.net/results/001/00154b0142f51c197d5d53ae36f7adc4f8250d9d/

---
 package/ruby/ruby.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/ruby/ruby.mk +4 -0
index 298493c..17104b6 100644
@@ -36,6 +36,10 @@ RUBY_CONF_ENV += ac_cv_func_dl_iterate_phdr=no
 RUBY_CONF_OPTS += --with-out-ext=fiddle
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
+RUBY_CONF_ENV += stack_protector=no
+endif
+
 # Force optionals to build before we do
 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
 RUBY_DEPENDENCIES += berkeleydb
Signature · 1 line
2.6.3
#2 lore raw

PATCH 2/2 ruby: explicitly disable SSP support

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

The SSP support checks of the Ruby configure script do not do a full link, and therefore don't properly detect if SSP support is fully functional or not, which causes some build failures if the compiler supports -fstack-protector but the C library does not provide the SSP implementation.

Quoted 8 lines

To avoid this, we explicitly tell ruby if SSP support is available or not.

Fixes:

http://autobuild.buildroot.net/results/001/00154b0142f51c197d5d53ae36f7adc4f8250d9d/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/2 ruby: do not overwrite RUBY_CONF_ENV

In reply to Thomas Petazzoni
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

In commit 53bf889cdca77979814bc6b74170e2f104fc3b70 ("ruby: should not use dl_iterate_phdr() on Blackfin") we added ac_cv_func_dl_iterate_phdr=no to RUBY_CONF_ENV when building on the Blackfin architecture.

However, while doing so, we overwrote the previous value of RUBY_CONF_ENV, which was defined to have custom CFLAGS:

RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)"

Quoted 8 lines

This has no visible effect because the custom CFLAGS are only used on SuperH/SuperH 64, while the overwrite of RUBY_CONF_ENV takes place on Blackfin.

However, it doesn't look very pretty, and future additions to RUBY_CONF_ENV may break this subtle behavior.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard