acinclude.m4 ([GLIBCXX_ENABLE_VISIBILITY]): Rename to [GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY]...

2011-11-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_ENABLE_VISIBILITY]): Rename to
	[GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY], likewise for the
	option itself, to --enable-libstdcxx-visibility.
	* configure.ac: Adjust call.
	* doc/xml/manual/configure.xml: Update.
	* configure: Regenerate.

From-SVN: r181162
This commit is contained in:
Paolo Carlini 2011-11-08 14:07:27 +00:00 committed by Paolo Carlini
parent fabe6a9a7a
commit dbe175248f
5 changed files with 51 additions and 38 deletions

View File

@ -1,3 +1,12 @@
2011-11-08 Paolo Carlini <paolo.carlini@oracle.com>
* acinclude.m4 ([GLIBCXX_ENABLE_VISIBILITY]): Rename to
[GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY], likewise for the
option itself, to --enable-libstdcxx-visibility.
* configure.ac: Adjust call.
* doc/xml/manual/configure.xml: Update.
* configure: Regenerate.
2011-11-08 Paolo Carlini <paolo.carlini@oracle.com> 2011-11-08 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/29_atomics/headers/atomic/macros.cc: Avoid -Wall * testsuite/29_atomics/headers/atomic/macros.cc: Avoid -Wall

View File

@ -3031,15 +3031,15 @@ EOF
dnl dnl
dnl Allow visibility attributes to be used on namespaces, objects, etc. dnl Allow visibility attributes to be used on namespaces, objects, etc.
dnl dnl
dnl --enable-visibility enables attempt to use visibility attributes. dnl --enable-libstdcxx-visibility enables attempt to use visibility attributes.
dnl --disable-visibility turns off all use of visibility attributes. dnl --disable-libstdcxx-visibility turns off all use of visibility attributes.
dnl + Usage: GLIBCXX_ENABLE_VISIBILITY[(DEFAULT)] dnl + Usage: GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY[(DEFAULT)]
dnl Where DEFAULT is 'yes'. dnl Where DEFAULT is 'yes'.
dnl dnl
AC_DEFUN([GLIBCXX_ENABLE_VISIBILITY], [ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY], [
GLIBCXX_ENABLE(visibility,$1,,[enables visibility safe usage]) GLIBCXX_ENABLE(libstdcxx-visibility,$1,,[enables visibility safe usage])
if test x$enable_visibility = xyes ; then if test x$enable_libstdcxx_visibility = xyes ; then
dnl all hail libgfortran dnl all hail libgfortran
dnl Check whether the target supports hidden visibility. dnl Check whether the target supports hidden visibility.
AC_CACHE_CHECK([whether the target supports hidden visibility], AC_CACHE_CHECK([whether the target supports hidden visibility],
@ -3051,12 +3051,12 @@ if test x$enable_visibility = xyes ; then
glibcxx_cv_have_attribute_visibility=no) glibcxx_cv_have_attribute_visibility=no)
CFLAGS="$save_CFLAGS"]) CFLAGS="$save_CFLAGS"])
if test $glibcxx_cv_have_attribute_visibility = no; then if test $glibcxx_cv_have_attribute_visibility = no; then
enable_visibility=no enable_libstdcxx_visibility=no
fi fi
fi fi
GLIBCXX_CONDITIONAL(ENABLE_VISIBILITY, test $enable_visibility = yes) GLIBCXX_CONDITIONAL(ENABLE_VISIBILITY, test $enable_libstdcxx_visibility = yes)
AC_MSG_NOTICE([visibility supported: $enable_visibility]) AC_MSG_NOTICE([visibility supported: $enable_libstdcxx_visibility])
]) ])

View File

@ -865,7 +865,7 @@ with_libiconv_prefix
with_system_libunwind with_system_libunwind
enable_linux_futex enable_linux_futex
enable_symvers enable_symvers
enable_visibility enable_libstdcxx_visibility
with_gxx_include_dir with_gxx_include_dir
enable_version_specific_runtime_libs enable_version_specific_runtime_libs
' '
@ -1554,7 +1554,8 @@ Optional Features:
--enable-symvers[=STYLE] --enable-symvers[=STYLE]
enables symbol versioning of the shared library enables symbol versioning of the shared library
[default=yes] [default=yes]
--enable-visibility enables visibility safe usage [default=yes] --enable-libstdcxx-visibility
enables visibility safe usage [default=yes]
--enable-version-specific-runtime-libs --enable-version-specific-runtime-libs
Specify that runtime libraries should be installed Specify that runtime libraries should be installed
in a compiler-specific directory in a compiler-specific directory
@ -11487,7 +11488,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11490 "configure" #line 11491 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11593,7 +11594,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11596 "configure" #line 11597 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -14951,7 +14952,7 @@ fi
# #
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 14954 "configure" #line 14955 "configure"
struct S { ~S(); }; struct S { ~S(); };
void bar(); void bar();
void foo() void foo()
@ -15302,7 +15303,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does. # Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15305 "configure" #line 15306 "configure"
int main() int main()
{ {
typedef bool atomic_type; typedef bool atomic_type;
@ -15339,7 +15340,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15342 "configure" #line 15343 "configure"
int main() int main()
{ {
typedef short atomic_type; typedef short atomic_type;
@ -15376,7 +15377,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15379 "configure" #line 15380 "configure"
int main() int main()
{ {
// NB: _Atomic_word not necessarily int. // NB: _Atomic_word not necessarily int.
@ -15414,7 +15415,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15417 "configure" #line 15418 "configure"
int main() int main()
{ {
typedef long long atomic_type; typedef long long atomic_type;
@ -15490,7 +15491,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
# unnecessary for this test. # unnecessary for this test.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15493 "configure" #line 15494 "configure"
int main() int main()
{ {
_Decimal32 d1; _Decimal32 d1;
@ -15532,7 +15533,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test. # unnecessary for this test.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15535 "configure" #line 15536 "configure"
template<typename T1, typename T2> template<typename T1, typename T2>
struct same struct same
{ typedef T2 type; }; { typedef T2 type; };
@ -15566,7 +15567,7 @@ $as_echo "$enable_int128" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15569 "configure" #line 15570 "configure"
template<typename T1, typename T2> template<typename T1, typename T2>
struct same struct same
{ typedef T2 type; }; { typedef T2 type; };
@ -65145,21 +65146,21 @@ $as_echo "$glibcxx_ptrdiff_t_is_i" >&6; }
# Check whether --enable-visibility was given. # Check whether --enable-libstdcxx-visibility was given.
if test "${enable_visibility+set}" = set; then : if test "${enable_libstdcxx_visibility+set}" = set; then :
enableval=$enable_visibility; enableval=$enable_libstdcxx_visibility;
case "$enableval" in case "$enableval" in
yes|no) ;; yes|no) ;;
*) as_fn_error "Argument to enable/disable visibility must be yes or no" "$LINENO" 5 ;; *) as_fn_error "Argument to enable/disable libstdcxx-visibility must be yes or no" "$LINENO" 5 ;;
esac esac
else else
enable_visibility=yes enable_libstdcxx_visibility=yes
fi fi
if test x$enable_visibility = xyes ; then if test x$enable_libstdcxx_visibility = xyes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5
$as_echo_n "checking whether the target supports hidden visibility... " >&6; } $as_echo_n "checking whether the target supports hidden visibility... " >&6; }
if test "${glibcxx_cv_have_attribute_visibility+set}" = set; then : if test "${glibcxx_cv_have_attribute_visibility+set}" = set; then :
@ -65190,13 +65191,13 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_have_attribute_visibility" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_have_attribute_visibility" >&5
$as_echo "$glibcxx_cv_have_attribute_visibility" >&6; } $as_echo "$glibcxx_cv_have_attribute_visibility" >&6; }
if test $glibcxx_cv_have_attribute_visibility = no; then if test $glibcxx_cv_have_attribute_visibility = no; then
enable_visibility=no enable_libstdcxx_visibility=no
fi fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: visibility supported: $enable_visibility" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: visibility supported: $enable_libstdcxx_visibility" >&5
$as_echo "$as_me: visibility supported: $enable_visibility" >&6;} $as_echo "$as_me: visibility supported: $enable_libstdcxx_visibility" >&6;}
ac_ldbl_compat=no ac_ldbl_compat=no
@ -66184,7 +66185,7 @@ else
fi fi
if test $enable_visibility = yes; then if test $enable_libstdcxx_visibility = yes; then
ENABLE_VISIBILITY_TRUE= ENABLE_VISIBILITY_TRUE=
ENABLE_VISIBILITY_FALSE='#' ENABLE_VISIBILITY_FALSE='#'
else else

View File

@ -311,7 +311,7 @@ GCC_HEADER_STDINT(include/gstdint.h)
GLIBCXX_ENABLE_SYMVERS([yes]) GLIBCXX_ENABLE_SYMVERS([yes])
AC_SUBST(libtool_VERSION) AC_SUBST(libtool_VERSION)
GLIBCXX_ENABLE_VISIBILITY([yes]) GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY([yes])
ac_ldbl_compat=no ac_ldbl_compat=no
case "$target" in case "$target" in

View File

@ -315,12 +315,15 @@
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-visibility</code></term> <varlistentry><term><code>--enable-libstdcxx-visibility</code></term>
<listitem><para> In 4.2 and later, enables or disables visibility attributes. <listitem><para> In 4.2 and later, enables or disables visibility
If enabled (as by default), and the compiler seems capable of attributes. If enabled (as by default), and the compiler seems
passing the simple sanity checks thrown at it, adjusts items capable of passing the simple sanity checks thrown at it, adjusts
in namespace std, namespace std::tr1, and namespace __gnu_cxx items in namespace std, namespace std::tr1, namespace std::tr2,
so that -fvisibility options work. and namespace __gnu_cxx to have <code>visibility ("default")</code>
so that -fvisibility options can be used without affecting the
normal external-visibility of namespace std entities.
Prior to 4.7 this option was spelled <code>--enable-visibility</code>.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>