[前][次][番号順一覧][スレッド一覧]

ruby-changes:28312

From: nobu <ko1@a...>
Date: Fri, 19 Apr 2013 11:37:20 +0900 (JST)
Subject: [ruby-changes:28312] nobu:r40364 (trunk): configure.in: -g and -fstack-protector flags can't work

nobu	2013-04-19 11:37:06 +0900 (Fri, 19 Apr 2013)

  New Revision: 40364

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40364

  Log:
    configure.in: -g and -fstack-protector flags can't work
    
     together on SmartOS
    * configure.in (stack_protector): control use of -fstack-protector.
    * configure.in (debugflags): let -fstack-protector precede and disable
      debugflags, because they can't work together on SmartOS.  [Bug #8268]

  Modified files:
    trunk/ChangeLog
    trunk/configure.in

Index: configure.in
===================================================================
--- configure.in	(revision 40363)
+++ configure.in	(revision 40364)
@@ -705,10 +705,6 @@ if test "$GCC:${warnflags+set}:no" = yes https://github.com/ruby/ruby/blob/trunk/configure.in#L705
     warnflags=
 fi
 if test "$GCC" = yes; then
-    test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb3, [debugflags=-ggdb3])}
-    test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb, [debugflags=-ggdb])}
-    test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
-
     # -D_FORTIFY_SOURCE
     # When defined _FORTIFY_SOURCE, glibc enables some additional sanity
     # argument check. The performance drop is very little and Ubuntu enables
@@ -720,13 +716,13 @@ if test "$GCC" = yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L716
     AS_CASE(["$target_os"],
     [mingw*|nacl|haiku], [
 	stack_protector=no
-    ],
-    [
+    ])
+    if test -z "${stack_protector+set}"; then
 	RUBY_TRY_CFLAGS(-fstack-protector, [stack_protector=yes], [stack_protector=no])
 	if test "x$stack_protector" = xyes; then
 	    RUBY_TRY_LDFLAGS(-fstack-protector, [], [stack_protector=broken])
 	fi
-    ])
+    fi
     if test "x$stack_protector" = xyes; then
 	RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector)
 	RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector)
@@ -758,6 +754,10 @@ if test "$GCC" = yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L754
 
     # suppress annoying -Wstrict-overflow warnings
     RUBY_TRY_CFLAGS(-fno-strict-overflow, [RUBY_APPEND_OPTION(XCFLAGS, -fno-strict-overflow)])
+
+    test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb3, [debugflags=-ggdb3])}
+    test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb, [debugflags=-ggdb])}
+    test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
 fi
 test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40363)
+++ ChangeLog	(revision 40364)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 19 11:36:53 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	 together on SmartOS
+
+	* configure.in (stack_protector): control use of -fstack-protector.
+
+	* configure.in (debugflags): let -fstack-protector precede and disable
+	  debugflags, because they can't work together on SmartOS.  [Bug #8268]
+
 Fri Apr 19 07:43:52 2013  NARUSE, Yui  <naruse@r...>
 
 	* test/openssl/test_cipher.rb: Correct a typo

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]