ruby-changes:52405
From: nobu <ko1@a...>
Date: Sun, 2 Sep 2018 12:49:35 +0900 (JST)
Subject: [ruby-changes:52405] nobu:r64614 (trunk): configure.ac: -fstack-protector-strong
nobu 2018-09-02 12:49:31 +0900 (Sun, 02 Sep 2018) New Revision: 64614 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64614 Log: configure.ac: -fstack-protector-strong * configure.ac: use -fstack-protector-strong if available instead of -fstack-protector conditionally. [ruby-core:88788] [Misc #15053] Modified files: trunk/configure.ac Index: configure.ac =================================================================== --- configure.ac (revision 64613) +++ configure.ac (revision 64614) @@ -524,15 +524,18 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L524 stack_protector=no ]) AS_IF([test -z "${stack_protector+set}"], [ - RUBY_TRY_CFLAGS(-fstack-protector, [stack_protector=yes], [stack_protector=no]) - AS_IF([test "x$stack_protector" = xyes], [ - RUBY_TRY_LDFLAGS(-fstack-protector, [], [stack_protector=broken]) + AS_FOR(option, opt, [-fstack-protector-strong -fstack-protector], [ + RUBY_TRY_CFLAGS(option, [stack_protector=yes]) + AS_IF([test "x$stack_protector" = xyes], [ + RUBY_TRY_LDFLAGS(option, [], [stack_protector=]) + ]) + AS_IF([test "x$stack_protector" = xyes], [stack_protector=option; break]) ]) ]) - AS_IF([test "x$stack_protector" = xyes], [ - RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector) - RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector) - RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector) + AS_CASE(["$stack_protector"], [-*], [ + RUBY_APPEND_OPTION(XCFLAGS, $stack_protector) + RUBY_APPEND_OPTION(XLDFLAGS, $stack_protector) + RUBY_APPEND_OPTION(LDFLAGS, $stack_protector) ]) AS_CASE("${compress_debug_sections:-zlib}", -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/