Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ruby: disable use of stack protector when not available
@ 2015-09-15 19:56 Brendan Heading
  2015-09-16 20:44 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Brendan Heading @ 2015-09-15 19:56 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/22e/22eced2dc9ca1bc90ef193b4dc40891c47157e89/

ruby, by default, attempts to use the stack protector if configure detects
that it exists. The stack protector detection does not attempt to link
libssp, which can cause a false positive.

Instead, check if the stack protector is enabled in the buildroot
toolchain config, and set the stack_protector=no environment variable to
force the stack protector off.

Signed-off-by: Brendan Heading <brendanheading@gmail.com>
---
 package/ruby/ruby.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk
index 243cd0b..9f78c33 100644
--- a/package/ruby/ruby.mk
+++ b/package/ruby/ruby.mk
@@ -36,6 +36,11 @@ RUBY_CONF_ENV = ac_cv_func_dl_iterate_phdr=no
 RUBY_CONF_OPTS += --with-out-ext=fiddle
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
+# Don't force -fstack-protector when SSP is not available in toolchain
+RUBY_CONF_ENV += stack_protector=no
+endif
+
 # Force optionals to build before we do
 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
 RUBY_DEPENDENCIES += berkeleydb
-- 
2.4.3

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

end of thread, other threads:[~2015-09-17 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 19:56 [Buildroot] [PATCH 1/1] package/ruby: disable use of stack protector when not available Brendan Heading
2015-09-16 20:44 ` Thomas Petazzoni
2015-09-16 21:29   ` Brendan Heading
2015-09-16 21:43     ` Thomas Petazzoni
2015-09-16 21:46       ` Brendan Heading
2015-09-17 10:25         ` Gustavo Zacarias
2015-09-17 14:16           ` Brendan Heading

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