diff options
Diffstat (limited to 'libstdc++-v3/src/c++11')
-rw-r--r-- | libstdc++-v3/src/c++11/Makefile.am | 22 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/Makefile.in | 26 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/compatibility-c++0x.cc | 2 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc | 8 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/regex.cc | 9 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/thread.cc | 7 |
7 files changed, 52 insertions, 26 deletions
diff --git a/libstdc++-v3/src/c++11/Makefile.am b/libstdc++-v3/src/c++11/Makefile.am index e8a4d3a66f9..f6502700080 100644 --- a/libstdc++-v3/src/c++11/Makefile.am +++ b/libstdc++-v3/src/c++11/Makefile.am @@ -68,7 +68,7 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources) # as the occasion calls for it. AM_CXXFLAGS = \ -std=gnu++11 \ - $(PIC_CXXFLAGS) \ + $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ $(XTEMPLATE_FLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) @@ -77,11 +77,7 @@ AM_MAKEFLAGS = \ # Libtool notes -# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is -# last. (That way, things like -O2 passed down from the toplevel can -# be overridden by --enable-debug.) - -# 2) In general, libtool expects an argument such as `--tag=CXX' when +# 1) In general, libtool expects an argument such as `--tag=CXX' when # using the C++ compiler, because that will enable the settings # detected when C++ support was being configured. However, when no # such flag is given in the command line, libtool attempts to figure @@ -93,8 +89,18 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# We have to put --tag disable-shared after --tag CXX lest things -# CXX undo the affect of disable-shared. +# +# The second tag argument, `--tag disable-shared` means that libtool +# only compiles each source once, for static objects. In actuality, +# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to +# the libtool command that is used create the object, which is +# suitable for shared libraries. The `--tag disable-shared` must be +# placed after --tag CXX lest things CXX undo the affect of +# disable-shared. + +# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is +# last. (That way, things like -O2 passed down from the toplevel can +# be overridden by --enable-debug.) LTCXXCOMPILE = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in index 0c63c514741..d725d260d5c 100644 --- a/libstdc++-v3/src/c++11/Makefile.in +++ b/libstdc++-v3/src/c++11/Makefile.in @@ -177,7 +177,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ -PIC_CXXFLAGS = @PIC_CXXFLAGS@ RANLIB = @RANLIB@ SECTION_FLAGS = @SECTION_FLAGS@ SECTION_LDFLAGS = @SECTION_LDFLAGS@ @@ -225,7 +224,10 @@ glibcxx_MOFILES = @glibcxx_MOFILES@ glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@ glibcxx_POFILES = @glibcxx_POFILES@ glibcxx_builddir = @glibcxx_builddir@ +glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@ +glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@ glibcxx_localedir = @glibcxx_localedir@ +glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@ glibcxx_prefixdir = @glibcxx_prefixdir@ glibcxx_srcdir = @glibcxx_srcdir@ glibcxx_toolexecdir = @glibcxx_toolexecdir@ @@ -331,7 +333,7 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources) # as the occasion calls for it. AM_CXXFLAGS = \ -std=gnu++11 \ - $(PIC_CXXFLAGS) \ + $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ $(XTEMPLATE_FLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) @@ -341,11 +343,7 @@ AM_MAKEFLAGS = \ # Libtool notes -# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is -# last. (That way, things like -O2 passed down from the toplevel can -# be overridden by --enable-debug.) - -# 2) In general, libtool expects an argument such as `--tag=CXX' when +# 1) In general, libtool expects an argument such as `--tag=CXX' when # using the C++ compiler, because that will enable the settings # detected when C++ support was being configured. However, when no # such flag is given in the command line, libtool attempts to figure @@ -357,8 +355,18 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# We have to put --tag disable-shared after --tag CXX lest things -# CXX undo the affect of disable-shared. +# +# The second tag argument, `--tag disable-shared` means that libtool +# only compiles each source once, for static objects. In actuality, +# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to +# the libtool command that is used create the object, which is +# suitable for shared libraries. The `--tag disable-shared` must be +# placed after --tag CXX lest things CXX undo the affect of +# disable-shared. + +# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is +# last. (That way, things like -O2 passed down from the toplevel can +# be overridden by --enable-debug.) LTCXXCOMPILE = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ diff --git a/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc index 8ccad9330ed..3ad0b93974e 100644 --- a/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc +++ b/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc @@ -30,7 +30,7 @@ // XXX GLIBCXX_ABI Deprecated // gcc-4.7.0 -#ifdef PIC +#ifdef _GLIBCXX_SHARED #define LOGSIZE 4 @@ -147,7 +147,7 @@ _GLIBCXX_END_NAMESPACE_VERSION // In the future, GLIBCXX_ABI > 6 should remove all uses of // _GLIBCXX_*_SYMVER macros in this file. -#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ +#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) diff --git a/libstdc++-v3/src/c++11/compatibility-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-c++0x.cc index bd5dbe0ff06..306bad55faf 100644 --- a/libstdc++-v3/src/c++11/compatibility-c++0x.cc +++ b/libstdc++-v3/src/c++11/compatibility-c++0x.cc @@ -30,7 +30,7 @@ # error "compatibility-c++0x.cc must be compiled with -std=gnu++0x" #endif -#ifdef PIC +#ifdef _GLIBCXX_SHARED namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc index e5c7eec419e..5e87b531923 100644 --- a/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc +++ b/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc @@ -23,7 +23,7 @@ // <http://www.gnu.org/licenses/>. #include <bits/c++config.h> -#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC) +#if defined(_GLIBCXX_HAVE_TLS) && defined(_GLIBCXX_SHARED) #define _GLIBCXX_ASYNC_ABI_COMPAT #endif @@ -40,7 +40,7 @@ // XXX GLIBCXX_ABI Deprecated // gcc-4.6.0 // <future> export changes -#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ +#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) @@ -57,7 +57,7 @@ _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx15future_categoryE, _ZSt15future_category, GLIB // gcc-4.6.0 // <mutex> export changes #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ +#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) @@ -82,7 +82,7 @@ _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx11try_to_lockE, _ZSt11try_to_lock, GLIBCXX_3.4. // <future> export changes #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \ && (ATOMIC_INT_LOCK_FREE > 1) -#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC) +#if defined(_GLIBCXX_HAVE_TLS) && defined(_GLIBCXX_SHARED) namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION diff --git a/libstdc++-v3/src/c++11/regex.cc b/libstdc++-v3/src/c++11/regex.cc index 8a47da341ae..d21f22176fb 100644 --- a/libstdc++-v3/src/c++11/regex.cc +++ b/libstdc++-v3/src/c++11/regex.cc @@ -1,6 +1,6 @@ // regex -*- C++ -*- -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 2011-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -34,5 +34,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION regex_error::~regex_error() throw() { } +#ifdef _AIX + // PR libstdc++/52887 + template class function<void (__regex::_PatternCursor const&, + __regex::_Results&)>; + template class function<bool (__regex::_PatternCursor const&)>; +#endif + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc index ff034b16143..d0d902fa471 100644 --- a/libstdc++-v3/src/c++11/thread.cc +++ b/libstdc++-v3/src/c++11/thread.cc @@ -1,6 +1,6 @@ // thread -*- C++ -*- -// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -26,6 +26,7 @@ #include <thread> #include <system_error> #include <cerrno> +#include <cxxabi_forced.h> #if defined(_GLIBCXX_USE_GET_NPROCS) # include <sys/sysinfo.h> @@ -72,6 +73,10 @@ namespace std _GLIBCXX_VISIBILITY(default) { __t->_M_run(); } + __catch(const __cxxabiv1::__forced_unwind&) + { + __throw_exception_again; + } __catch(...) { std::terminate(); |