1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in: changed default optflags to -O0 if the compiler is

llvm-gcc. It prevent ruby crash on OS X 10.7 (Lion).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-07-23 15:18:32 +00:00
parent 9eba5f65e2
commit e39294cac5
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Sun Jul 24 00:16:13 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* 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@jeremyevans.net> Sun Jul 24 00:05:00 2011 Jeremy Evans <merch-redmine@jeremyevans.net>
* error.c (rb_name_error_str): new function to raise NameError * error.c (rb_name_error_str): new function to raise NameError

View file

@ -277,7 +277,13 @@ AC_PROG_GCC_TRADITIONAL
AC_SUBST(GCC) AC_SUBST(GCC)
if test "$GCC" = yes; then if test "$GCC" = yes; then
linker_flag=-Wl, 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}]) AS_CASE(["$target_os"], [linux*|darwin*], [: ${debugflags=-ggdb}])
RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"]) RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
else else