diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-12 09:41:07 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-12 09:41:07 +0000 |
commit | 0284e64922bae06a58bdc659022079729425117b (patch) | |
tree | ca9a171c8740f86e69727dd3903b5846224eaa19 /configure.in | |
parent | aa56c127b5f4fe02a060bca02bdda49ae4b36a76 (diff) | |
download | ruby-0284e64922bae06a58bdc659022079729425117b.tar.gz |
* configure.in: enable strict ANSI mode by default in case of GCC,
requested by _ko1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 43948fa1ba..59e62414f6 100644 --- a/configure.in +++ b/configure.in @@ -584,6 +584,7 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then warnflags= fi if test "$GCC" = yes; then + test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb3, [debugflags=-ggdb])} test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb, [debugflags=-ggdb])} test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])} @@ -607,6 +608,12 @@ if test "$GCC" = yes; then RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector) fi + # ANSI (no XCFLAGS because this is C only) + RUBY_TRY_CFLAGS(-ansi -std=iso9899:199409, [ + RUBY_APPEND_OPTION(warnflags, -ansi -std=iso9899:199409) + RUBY_APPEND_OPTION(rb_cv_warnflags, -ansi -std=iso9899:199409) + ]) + # suppress annoying -Wstrict-overflow warnings RUBY_TRY_CFLAGS(-fno-strict-overflow, [RUBY_APPEND_OPTION(XCFLAGS, -fno-strict-overflow)]) fi |