diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 6 |
1 files changed, 4 insertions, 2 deletions
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"]) |