diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-28 02:44:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-28 02:44:52 +0000 |
commit | 1c85a648febde2176493b26130b08c742b3de305 (patch) | |
tree | 8f689f5050d6216f5b278f8cbd8be7f6d0ceb3a9 /configure.in | |
parent | 0cb987bc514495c99c3f5c3ee373594507d1c115 (diff) |
* configure.in (debugflags): check if -ggdb is accepted.
[ruby-core:42875][Bug #6080]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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"]) |