diff --git a/ChangeLog b/ChangeLog index 5f369afe11..625af14191 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Nov 8 14:13:53 2012 Nobuyoshi Nakada + + * 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] + Thu Nov 8 14:11:49 2012 Nobuyoshi Nakada * vm.c (rb_vm_jump_tag_but_local_jump): pass through thrown objects. 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) diff --git a/version.h b/version.h index bb8a2eb95c..da845ea467 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 308 +#define RUBY_PATCHLEVEL 309 #define RUBY_RELEASE_DATE "2012-11-08" #define RUBY_RELEASE_YEAR 2012