aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2009-11-30 23:22:04 +0000
committerDave Korn <davek@gcc.gnu.org>2009-11-30 23:22:04 +0000
commitf7e413e2d4d7024c6410c82503cd89d156a1807e (patch)
tree9471c38454c458137ad85815b86a55469917bef7 /libstdc++-v3
parent9c39ceab1a91f8f95ec0b44e1388832e6f91e0d3 (diff)
downloadgcc-f7e413e2d4d7024c6410c82503cd89d156a1807e.tar.gz
gcc-f7e413e2d4d7024c6410c82503cd89d156a1807e.tar.bz2
gcc-f7e413e2d4d7024c6410c82503cd89d156a1807e.zip
configure.ac (USE_CYGWIN_LIBSTDCXX_WRAPPERS): Define to reflect status of AC_CHECK_FUNC for Cygwin DLL libstdc++ support wrappers.
gcc/ChangeLog: 2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com> * configure.ac (USE_CYGWIN_LIBSTDCXX_WRAPPERS): Define to reflect status of AC_CHECK_FUNC for Cygwin DLL libstdc++ support wrappers. * configure: Regenerate. * config.in: Regenerate. * config/i386/cygwin.h (CXX_WRAP_SPEC_LIST): Define list of --wrap options for Cygwin DLL libstdc++ support wrappers. (CXX_WRAP_SPEC_OPT): Define spec to use wrappers or not by default according to defined value of USE_CYGWIN_LIBSTDCXX_WRAPPERS. (CXX_WRAP_SPEC): Define entire wrapper spec in or out according to whether USE_CYGWIN_LIBSTDCXX_WRAPPERS is even defined or not. (LINK_SPEC): Include CXX_WRAP_SPEC. * gcc/config/i386/winnt.c (wrapper_strcmp): New qsort helper function. (i386_find_on_wrapper_list): Check if a function is found on the list of libstdc++ wrapper options. (i386_pe_file_end): If we are importing a wrapped function, also emit an external declaration for the real version. * config/i386/cygming.opt (muse-libstdc-wrappers): New option for Cygwin targets. Update copyright year. libstdc++-v3/ChangeLog: 2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com> * libstdc++-v3/acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Don't disable on PE targets. * libstdc++-v3/configure: Regenerate. * libstdc++-v3/configure.host: Add libtool DLL options for Cygwin and MinGW platforms. * libstdc++-v3/include/bits/c++config (_GLIBCXX_VISIBILITY_ATTR): On platforms that don't support visibility, allow them to declare a macro _GLIBCXX_PSEUDO_VISIBILITY that is applied in place of visibility. (_GLIBCXX_PSEUDO_VISIBILITY): Supply empty default if not declared by CPU- or OS-specific headers. * libstdc++-v3/config/os/newlib/os_defines.h (_GLIBCXX_PSEUDO_VISIBILITY_default): New macro for dllimport. (_GLIBCXX_PSEUDO_VISIBILITY_hidden): New empty macro. (_GLIBCXX_PSEUDO_VISIBILITY): Evaluate to one of the above. * libstdc++-v3/config/os/mingw32/os_defines.h (_GLIBCXX_PSEUDO_VISIBILITY_default, _GLIBCXX_PSEUDO_VISIBILITY_hidden, _GLIBCXX_PSEUDO_VISIBILITY): Likewise. From-SVN: r154853
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog23
-rw-r--r--libstdc++-v3/acinclude.m42
-rw-r--r--libstdc++-v3/config/os/mingw32/os_defines.h9
-rw-r--r--libstdc++-v3/config/os/newlib/os_defines.h9
-rwxr-xr-xlibstdc++-v3/configure2
-rw-r--r--libstdc++-v3/configure.host2
-rw-r--r--libstdc++-v3/include/bits/c++config10
7 files changed, 54 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5919694834b..e44d6f4e5f3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,26 @@
+2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * libstdc++-v3/acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Don't disable
+ on PE targets.
+ * libstdc++-v3/configure: Regenerate.
+ * libstdc++-v3/configure.host: Add libtool DLL options for Cygwin
+ and MinGW platforms.
+
+ * libstdc++-v3/include/bits/c++config (_GLIBCXX_VISIBILITY_ATTR): On
+ platforms that don't support visibility, allow them to declare a macro
+ _GLIBCXX_PSEUDO_VISIBILITY that is applied in place of visibility.
+ (_GLIBCXX_PSEUDO_VISIBILITY): Supply empty default if not declared by
+ CPU- or OS-specific headers.
+
+ * libstdc++-v3/config/os/newlib/os_defines.h
+ (_GLIBCXX_PSEUDO_VISIBILITY_default): New macro for dllimport.
+ (_GLIBCXX_PSEUDO_VISIBILITY_hidden): New empty macro.
+ (_GLIBCXX_PSEUDO_VISIBILITY): Evaluate to one of the above.
+ * libstdc++-v3/config/os/mingw32/os_defines.h
+ (_GLIBCXX_PSEUDO_VISIBILITY_default,
+ _GLIBCXX_PSEUDO_VISIBILITY_hidden,
+ _GLIBCXX_PSEUDO_VISIBILITY): Likewise.
+
2009-11-30 Paolo Carlini <paolo.carlini@oracle.com>
* include/tr1_impl/functional: Remove file, copy its contents,
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index aba9a1b2f52..e0c698d75c2 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2737,7 +2737,7 @@ if test x$enable_symvers = xyes ; then
else
if test $with_gnu_ld = yes ; then
case ${target_os} in
- cygwin* | pe | mingw32* | hpux*)
+ hpux*)
enable_symvers=no ;;
*)
enable_symvers=gnu ;;
diff --git a/libstdc++-v3/config/os/mingw32/os_defines.h b/libstdc++-v3/config/os/mingw32/os_defines.h
index 7b4e8066457..5435ce9ae84 100644
--- a/libstdc++-v3/config/os/mingw32/os_defines.h
+++ b/libstdc++-v3/config/os/mingw32/os_defines.h
@@ -45,6 +45,15 @@
#undef NOMINMAX
#define NOMINMAX 1
+#if defined (_GLIBCXX_DLL)
+#define _GLIBCXX_PSEUDO_VISIBILITY_default __attribute__ ((__dllimport__))
+#else
+#define _GLIBCXX_PSEUDO_VISIBILITY_default
+#endif
+#define _GLIBCXX_PSEUDO_VISIBILITY_hidden
+
+#define _GLIBCXX_PSEUDO_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY_ ## V
+
// See libstdc++/20806.
#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1
diff --git a/libstdc++-v3/config/os/newlib/os_defines.h b/libstdc++-v3/config/os/newlib/os_defines.h
index fbc886365ff..1ff3d4846cb 100644
--- a/libstdc++-v3/config/os/newlib/os_defines.h
+++ b/libstdc++-v3/config/os/newlib/os_defines.h
@@ -36,6 +36,15 @@
#ifdef __CYGWIN__
#define _GLIBCXX_GTHREAD_USE_WEAK 0
+#if defined (_GLIBCXX_DLL)
+#define _GLIBCXX_PSEUDO_VISIBILITY_default __attribute__ ((__dllimport__))
+#else
+#define _GLIBCXX_PSEUDO_VISIBILITY_default
+#endif
+#define _GLIBCXX_PSEUDO_VISIBILITY_hidden
+
+#define _GLIBCXX_PSEUDO_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY_ ## V
+
// See libstdc++/20806.
#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1
#endif
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 75adc589e12..4f5d51783d6 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -58050,7 +58050,7 @@ if test x$enable_symvers = xyes ; then
else
if test $with_gnu_ld = yes ; then
case ${target_os} in
- cygwin* | pe | mingw32* | hpux*)
+ hpux*)
enable_symvers=no ;;
*)
enable_symvers=gnu ;;
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index de7745a1286..02292b016d0 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -209,6 +209,7 @@ case "${host_os}" in
;;
cygwin*)
os_include_dir="os/newlib"
+ OPT_LDFLAGS="${OPT_LDFLAGS} -no-undefined -bindir \$(bindir)"
;;
darwin | darwin[1-7] | darwin[1-7].*)
# On Darwin, performance is improved if libstdc++ is single-module.
@@ -258,6 +259,7 @@ case "${host_os}" in
mingw32*)
os_include_dir="os/mingw32"
error_constants_dir="os/mingw32"
+ OPT_LDFLAGS="${OPT_LDFLAGS} -no-undefined -bindir \$(bindir)"
;;
netbsd*)
os_include_dir="os/bsd/netbsd"
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index f4f1f8b901f..3746696458a 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -42,7 +42,9 @@
#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
#else
-# define _GLIBCXX_VISIBILITY_ATTR(V)
+// If this is not supplied by the OS-specific or CPU-specific
+// headers included below, it will be defined to an empty default.
+# define _GLIBCXX_VISIBILITY_ATTR(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
#endif
// Macros for deprecated.
@@ -275,6 +277,12 @@ namespace std
// Pick up any CPU-specific definitions.
#include <bits/cpu_defines.h>
+// If platform uses neither visibility nor psuedo-visibility,
+// specify empty default for namespace annotation macros.
+#ifndef _GLIBCXX_PSEUDO_VISIBILITY
+#define _GLIBCXX_PSEUDO_VISIBILITY(V)
+#endif
+
// Allow use of "export template." This is currently not a feature
// that g++ supports.
// #define _GLIBCXX_EXPORT_TEMPLATE 1