ruby-changes:20599
From: kosaki <ko1@a...>
Date: Sun, 24 Jul 2011 00:18:41 +0900 (JST)
Subject: [ruby-changes:20599] kosaki:r32647 (trunk): * configure.in: changed default optflags to -O0 if the compiler is
kosaki 2011-07-24 00:18:32 +0900 (Sun, 24 Jul 2011) New Revision: 32647 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32647 Log: * configure.in: changed default optflags to -O0 if the compiler is llvm-gcc. It prevent ruby crash on OS X 10.7 (Lion). Modified files: trunk/ChangeLog trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 32646) +++ configure.in (revision 32647) @@ -277,7 +277,13 @@ AC_SUBST(GCC) if test "$GCC" = yes; then linker_flag=-Wl, - : ${optflags=-O3} + if test "$CC -v 2>&1 | grep LLVM" ; then + # llvm-gcc's optimization strategy is far different from gcc. + # It makes confusing our gcc specific optimized code. + : ${optflags=-O0} + else + : ${optflags=-O3} + fi AS_CASE(["$target_os"], [linux*|darwin*], [: ${debugflags=-ggdb}]) RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"]) else Index: ChangeLog =================================================================== --- ChangeLog (revision 32646) +++ ChangeLog (revision 32647) @@ -1,3 +1,8 @@ +Sun Jul 24 00:16:13 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * configure.in: changed default optflags to -O0 if the compiler is + llvm-gcc. It prevent ruby crash on OS X 10.7 (Lion). + Sun Jul 24 00:05:00 2011 Jeremy Evans <merch-redmine@j...> * error.c (rb_name_error_str): new function to raise NameError -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/