diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index de7e73f248d30300c83acac403cd9dad7347b3a0..0fc92a0e5ed824b6d73d2b4836e7ac4fc3d20671 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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>
 
 	* testsuite/29_atomics/headers/atomic/macros.cc: Avoid -Wall
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 6cc6ace873fd055b18c118f3ecf0b3fd5d967028..fee5c6f27767f60ee6270104543346ba37539bab 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3031,15 +3031,15 @@ EOF
 dnl
 dnl Allow visibility attributes to be used on namespaces, objects, etc.
 dnl
-dnl --enable-visibility enables attempt to use visibility attributes.
-dnl --disable-visibility turns off all use of visibility attributes.
-dnl  +  Usage:  GLIBCXX_ENABLE_VISIBILITY[(DEFAULT)]
+dnl --enable-libstdcxx-visibility enables attempt to use visibility attributes.
+dnl --disable-libstdcxx-visibility turns off all use of visibility attributes.
+dnl  +  Usage:  GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY[(DEFAULT)]
 dnl       Where DEFAULT is 'yes'.
 dnl
-AC_DEFUN([GLIBCXX_ENABLE_VISIBILITY], [
-GLIBCXX_ENABLE(visibility,$1,,[enables visibility safe usage])
+AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY], [
+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 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)
   CFLAGS="$save_CFLAGS"])
   if test $glibcxx_cv_have_attribute_visibility = no; then
-    enable_visibility=no
+    enable_libstdcxx_visibility=no
   fi
 fi
 
-GLIBCXX_CONDITIONAL(ENABLE_VISIBILITY, test $enable_visibility = yes)
-AC_MSG_NOTICE([visibility supported: $enable_visibility])
+GLIBCXX_CONDITIONAL(ENABLE_VISIBILITY, test $enable_libstdcxx_visibility = yes)
+AC_MSG_NOTICE([visibility supported: $enable_libstdcxx_visibility])
 ])
 
 
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 3be252e5c857b23d1c0836b45612134d82bee35c..fa755b4723697e0b14b07ca843a17921ffc23919 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -865,7 +865,7 @@ with_libiconv_prefix
 with_system_libunwind
 enable_linux_futex
 enable_symvers
-enable_visibility
+enable_libstdcxx_visibility
 with_gxx_include_dir
 enable_version_specific_runtime_libs
 '
@@ -1554,7 +1554,8 @@ Optional Features:
   --enable-symvers[=STYLE]
                           enables symbol versioning of the shared library
                           [default=yes]
-  --enable-visibility     enables visibility safe usage [default=yes]
+  --enable-libstdcxx-visibility
+                          enables visibility safe usage [default=yes]
   --enable-version-specific-runtime-libs
                           Specify that runtime libraries should be installed
                           in a compiler-specific directory
@@ -11487,7 +11488,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11490 "configure"
+#line 11491 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11593,7 +11594,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11596 "configure"
+#line 11597 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14951,7 +14952,7 @@ fi
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 14954 "configure"
+#line 14955 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -15302,7 +15303,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15305 "configure"
+#line 15306 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15339,7 +15340,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15342 "configure"
+#line 15343 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15376,7 +15377,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15379 "configure"
+#line 15380 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15414,7 +15415,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15417 "configure"
+#line 15418 "configure"
 int main()
 {
   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.
 
     cat > conftest.$ac_ext << EOF
-#line 15493 "configure"
+#line 15494 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15532,7 +15533,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15535 "configure"
+#line 15536 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15566,7 +15567,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15569 "configure"
+#line 15570 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -65145,21 +65146,21 @@ $as_echo "$glibcxx_ptrdiff_t_is_i" >&6; }
 
 
 
- # Check whether --enable-visibility was given.
-if test "${enable_visibility+set}" = set; then :
-  enableval=$enable_visibility;
+ # Check whether --enable-libstdcxx-visibility was given.
+if test "${enable_libstdcxx_visibility+set}" = set; then :
+  enableval=$enable_libstdcxx_visibility;
       case "$enableval" in
        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
 
 else
-  enable_visibility=yes
+  enable_libstdcxx_visibility=yes
 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_n "checking whether the target supports hidden visibility... " >&6; }
 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 "$glibcxx_cv_have_attribute_visibility" >&6; }
   if test $glibcxx_cv_have_attribute_visibility = no; then
-    enable_visibility=no
+    enable_libstdcxx_visibility=no
   fi
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: visibility supported: $enable_visibility" >&5
-$as_echo "$as_me: visibility supported: $enable_visibility" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: visibility supported: $enable_libstdcxx_visibility" >&5
+$as_echo "$as_me: visibility supported: $enable_libstdcxx_visibility" >&6;}
 
 
 ac_ldbl_compat=no
@@ -66184,7 +66185,7 @@ else
 fi
 
 
-    if test $enable_visibility = yes; then
+    if test $enable_libstdcxx_visibility = yes; then
   ENABLE_VISIBILITY_TRUE=
   ENABLE_VISIBILITY_FALSE='#'
 else
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 8f853076cbeaf0a94141da8eebb76ed767deb90c..d453f63e207191614a55a4ae3680673505135025 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -311,7 +311,7 @@ GCC_HEADER_STDINT(include/gstdint.h)
 GLIBCXX_ENABLE_SYMVERS([yes])
 AC_SUBST(libtool_VERSION)
 
-GLIBCXX_ENABLE_VISIBILITY([yes])
+GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY([yes])
 
 ac_ldbl_compat=no
 case "$target" in
diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml
index 5d893d7a1be3b4a7a3af83d01b9ac2f04d859550..026711eefab0332e0708bd9cda25be4743f7f017 100644
--- a/libstdc++-v3/doc/xml/manual/configure.xml
+++ b/libstdc++-v3/doc/xml/manual/configure.xml
@@ -315,12 +315,15 @@
 
  </listitem></varlistentry>
 
- <varlistentry><term><code>--enable-visibility</code></term>
- <listitem><para> In 4.2 and later, enables or disables visibility attributes.
-	If enabled (as by default), and the compiler seems capable of
-	passing the simple sanity checks thrown at it, adjusts items
-	in namespace std, namespace std::tr1, and namespace __gnu_cxx
-	so that -fvisibility options work.
+ <varlistentry><term><code>--enable-libstdcxx-visibility</code></term>
+ <listitem><para> In 4.2 and later, enables or disables visibility 
+        attributes. If enabled (as by default), and the compiler seems
+        capable of passing the simple sanity checks thrown at it, adjusts
+        items in namespace std, namespace std::tr1, namespace std::tr2,
+        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>
  </listitem></varlistentry>