diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Tue Feb 28 11:44:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * configure.in (debugflags): check if -ggdb is accepted. + [ruby-core:42875][Bug #6080] + Tue Feb 28 10:28:51 2012 Aaron Patterson <aaron@tenderlovemaking.com> * ext/psych/lib/psych.rb: default open YAML files with utf8 external diff --git a/configure.in b/configure.in index 8f9e7d0810..0407bfe5e1 100644 --- a/configure.in +++ b/configure.in @@ -289,12 +289,10 @@ AC_SUBST(GCC) if test "$GCC" = yes; then linker_flag=-Wl, : ${optflags=-O3} - AS_CASE(["$target_os"], [linux*|darwin*], [: ${debugflags=-ggdb}]) RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"]) else linker_flag= fi -test $ac_cv_prog_cc_g = yes && : ${debugflags=-g} RUBY_PROG_GNU_LD RUBY_CPPOUTFILE @@ -490,6 +488,9 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then warnflags= fi if test "$GCC" = yes; then + test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb, [debugflags=-ggdb])} + test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])} + # -D_FORTIFY_SOURCE RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)]) @@ -513,6 +514,7 @@ if test "$GCC" = yes; then # suppress annoying -Wstrict-overflow warnings RUBY_TRY_CFLAGS(-fno-strict-overflow, [RUBY_APPEND_OPTION(XCFLAGS, -fno-strict-overflow)]) fi +test $ac_cv_prog_cc_g = yes && : ${debugflags=-g} if test "$GCC" = ""; then AS_CASE(["$target_os"],[aix*],[warnflags="-qinfo=por"]) |