[前][次][番号順一覧][スレッド一覧]

ruby-changes:25244

From: nobu <ko1@a...>
Date: Tue, 23 Oct 2012 14:07:07 +0900 (JST)
Subject: [ruby-changes:25244] nobu:r37296 (trunk): configure.in: no visibility option for older GCC

nobu	2012-10-23 14:06:50 +0900 (Tue, 23 Oct 2012)

  New Revision: 37296

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37296

  Log:
    configure.in: no visibility option for older GCC
    
    * 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]

  Modified files:
    trunk/ChangeLog
    trunk/configure.in

Index: configure.in
===================================================================
--- configure.in	(revision 37295)
+++ configure.in	(revision 37296)
@@ -644,7 +644,15 @@
     AS_CASE(["$target_os"],[aix*],[warnflags="$warnflags -qinfo=por" rb_cv_warnflags="$rb_cv_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)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37295)
+++ ChangeLog	(revision 37296)
@@ -1,3 +1,9 @@
+Tue Oct 23 14:06:47 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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]
+
 Tue Oct 23 12:57:29 2012  Koichi Sasada  <ko1@a...>
 
 	* vm_core.h, vm_insnhelper.c, vm_eval.c (OPT_CALL_CFUNC_WITHOUT_FRAME):

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]