diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-08 05:14:10 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-08 05:14:10 +0000 |
commit | b5a6ad3f8c4c6128b51f0b94ce3f39fabd3089b4 (patch) | |
tree | fafcda8f7152298a3c5657b01ea426cda4f33fb7 /configure.in | |
parent | b91f5c75ede542e87933194956fd0ed76d821e6c (diff) |
merge revision(s) 37296: [Backport #7205]
* configure.in (visibility_option): visibility attribute is not
available before GCC 4, so do not use -fvisibility option in that
case. [ruby-core:48147] [Bug #7205]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 9a724ab0a1..b006a01a81 100644 --- a/configure.in +++ b/configure.in @@ -496,7 +496,15 @@ if test "$GCC" = ""; then AS_CASE(["$target_os"],[aix*],[warnflags="-qinfo=por"]) fi if test "$GCC" = yes; then - RUBY_TRY_CFLAGS(-fvisibility=hidden, [RUBY_APPEND_OPTION(XCFLAGS, -fvisibility=hidden)]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + @%:@if !(defined __GNUC__ && __GNUC__ >= 4) + @%:@error not GCC 4 or later + >>>not GCC 4 or later<<< + @%:@endif])], + [visibility_option=yes], [visibility_option=no]) + if test "$visibility_option" = yes; then + RUBY_TRY_CFLAGS(-fvisibility=hidden, [visibility_option=yes], [visibility_option=no]) + fi AC_SUBST(WERRORFLAG, "-Werror") if test "$visibility_option" = yes; then RUBY_APPEND_OPTION(XCFLAGS, -fvisibility=hidden) |