1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.in: gcc_major

* configure.in: use gcc_major value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-04-05 14:08:27 +00:00
parent b493f30a42
commit 23335c78d3

View file

@ -434,7 +434,7 @@ RUBY_CPPOUTFILE
AC_SUBST(OUTFLAG)
AC_SUBST(COUTFLAG)
cc_version_option=
cc_version=
for option in --version -v -V -qversion; do
$CC $option > /dev/null 2>&1 || continue
cc_version='$(CC) '$option
@ -765,13 +765,7 @@ if test "$GCC" = ""; then
AS_CASE(["$target_os"],[aix*],[warnflags="$warnflags -qinfo=por" rb_cv_warnflags="$rb_cv_warnflags -qinfo=por"])
fi
if test "$GCC" = yes; then
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
if test "$gcc_major" -ge 4; then
RUBY_TRY_CFLAGS(-fvisibility=hidden, [visibility_option=yes], [visibility_option=no])
fi
AC_SUBST(WERRORFLAG, "-Werror")