From f7121b82c5a2c8755fbfe8849f2318ea67aece38 Mon Sep 17 00:00:00 2001 From: bkoz Date: Tue, 17 Apr 2012 00:19:12 +0000 Subject: [PATCH] 2012-04-16 Bernhard Reutner-Fischer PR bootstrap/52840 * src/Makefile.am (build-debug): Do not adjust vpath dir, remove Makefile.tmp * src/Makefile.in: Adjust as per above. 2012-04-16 Benjamin Kosnik PR libstdc++/52689 * libsupc++/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. * libsupc++/Makefile.in: Regenerated. * src/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. (libstdc___la_SOURCES): Add in compatiblity files, with content that varies with -DPIC. * src/Makefile.in: Regenerated. * src/c++11/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. * src/c++11/Makefile.in: Regenerated. * src/c++11/compatibility-atomic-c++0x.cc: Guard with PIC. * src/c++11/compatibility-c++0x.cc: Same. * src/c++11/future.cc: Consolidate compatibility bits into.. * src/c++11/mutex.cc: Consolidate compatibility bits into.. * src/c++11/compatibility-thread-cxx0x.cc: ...here. New. * src/c++98/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. * src/c++98/Makefile.in: Regenerated. * src/c++98/compatibility-list-2.cc: Guard with PIC. * src/c++98/compatibility.cc: Tweak comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186517 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 28 +++++ libstdc++-v3/libsupc++/Makefile.am | 31 +++--- libstdc++-v3/libsupc++/Makefile.in | 30 +++--- libstdc++-v3/src/Makefile.am | 99 ++++++++++++++--- libstdc++-v3/src/Makefile.in | 120 ++++++++++++++++----- libstdc++-v3/src/c++11/Makefile.am | 24 ++--- libstdc++-v3/src/c++11/Makefile.in | 33 +++--- .../src/c++11/compatibility-atomic-c++0x.cc | 5 +- libstdc++-v3/src/c++11/compatibility-c++0x.cc | 5 +- .../src/c++11/compatibility-thread-c++0x.cc | 72 +++++++++++++ libstdc++-v3/src/c++11/future.cc | 20 ---- libstdc++-v3/src/c++11/mutex.cc | 28 +---- libstdc++-v3/src/c++98/Makefile.am | 59 +++------- libstdc++-v3/src/c++98/Makefile.in | 75 ++++--------- libstdc++-v3/src/c++98/compatibility-ldbl.cc | 2 +- libstdc++-v3/src/c++98/compatibility-list-2.cc | 6 +- libstdc++-v3/src/c++98/compatibility-list.cc | 2 +- libstdc++-v3/src/c++98/compatibility.cc | 6 +- 18 files changed, 392 insertions(+), 253 deletions(-) create mode 100644 libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d1c7e841604..8cc92fca376 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,31 @@ +2012-04-16 Bernhard Reutner-Fischer + + PR bootstrap/52840 + * src/Makefile.am (build-debug): Do not adjust vpath dir, remove + Makefile.tmp + * src/Makefile.in: Adjust as per above. + +2012-04-16 Benjamin Kosnik + + PR libstdc++/52689 + * libsupc++/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. + * libsupc++/Makefile.in: Regenerated. + * src/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. + (libstdc___la_SOURCES): Add in compatiblity files, with content + that varies with -DPIC. + * src/Makefile.in: Regenerated. + * src/c++11/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. + * src/c++11/Makefile.in: Regenerated. + * src/c++11/compatibility-atomic-c++0x.cc: Guard with PIC. + * src/c++11/compatibility-c++0x.cc: Same. + * src/c++11/future.cc: Consolidate compatibility bits into.. + * src/c++11/mutex.cc: Consolidate compatibility bits into.. + * src/c++11/compatibility-thread-cxx0x.cc: ...here. New. + * src/c++98/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. + * src/c++98/Makefile.in: Regenerated. + * src/c++98/compatibility-list-2.cc: Guard with PIC. + * src/c++98/compatibility.cc: Tweak comments. + 2012-04-16 Benjamin Kosnik * include/ext/pb_ds/detail/pat_trie_/ diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am index bee43531667..eaf109e7309 100644 --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -32,17 +32,17 @@ toolexeclib_LTLIBRARIES = libsupc++.la noinst_LTLIBRARIES = libsupc++convenience.la std_HEADERS = \ - cxxabi.h exception initializer_list new typeinfo + cxxabi.h exception initializer_list new typeinfo bits_HEADERS = \ atomic_lockfree_defines.h cxxabi_forced.h \ - exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h + exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h headers = $(std_HEADERS) $(bits_HEADERS) if GLIBCXX_HOSTED c_sources = \ - cp-demangle.c + cp-demangle.c endif sources = \ @@ -95,7 +95,7 @@ sources = \ vmi_class_type_info.cc \ vterminate.cc -libsupc___la_SOURCES = $(sources) $(c_sources) +libsupc___la_SOURCES = $(sources) $(c_sources) libsupc__convenience_la_SOURCES = $(sources) $(c_sources) # AM_CXXFLAGS needs to be in each subdirectory so that it can be @@ -106,9 +106,7 @@ libsupc__convenience_la_SOURCES = $(sources) $(c_sources) AM_CXXFLAGS = \ $(PIC_CXXFLAGS) \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" @@ -125,7 +123,7 @@ C_COMPILE = \ # LTCOMPILE is copied from LTCXXCOMPILE below. LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \ $(CC) $(DEFS) $(C_INCLUDES) $(PIC_CXXFLAGS) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) cp-demangle.c: rm -f $@ @@ -178,9 +176,11 @@ nested_exception.o: nested_exception.cc # # We have to put --tag disable-shared after --tag CXX lest things # CXX undo the affect of disable-shared. -LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -190,10 +190,11 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=link $(CXX) \ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ - +CXXLINK = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ # Install notes # We have to have rules modified from the default to counteract SUN make diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index ee65762bdcb..831f22be933 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -344,15 +344,15 @@ toolexeclib_LTLIBRARIES = libsupc++.la # 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a noinst_LTLIBRARIES = libsupc++convenience.la std_HEADERS = \ - cxxabi.h exception initializer_list new typeinfo + cxxabi.h exception initializer_list new typeinfo bits_HEADERS = \ atomic_lockfree_defines.h cxxabi_forced.h \ - exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h + exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h headers = $(std_HEADERS) $(bits_HEADERS) @GLIBCXX_HOSTED_TRUE@c_sources = \ -@GLIBCXX_HOSTED_TRUE@ cp-demangle.c +@GLIBCXX_HOSTED_TRUE@ cp-demangle.c sources = \ array_type_info.cc \ @@ -404,7 +404,7 @@ sources = \ vmi_class_type_info.cc \ vterminate.cc -libsupc___la_SOURCES = $(sources) $(c_sources) +libsupc___la_SOURCES = $(sources) $(c_sources) libsupc__convenience_la_SOURCES = $(sources) $(c_sources) # AM_CXXFLAGS needs to be in each subdirectory so that it can be @@ -415,9 +415,7 @@ libsupc__convenience_la_SOURCES = $(sources) $(c_sources) AM_CXXFLAGS = \ $(PIC_CXXFLAGS) \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" @@ -435,7 +433,7 @@ C_COMPILE = \ # LTCOMPILE is copied from LTCXXCOMPILE below. LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \ $(CC) $(DEFS) $(C_INCLUDES) $(PIC_CXXFLAGS) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) # Libtool notes @@ -459,9 +457,11 @@ LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=comp # # We have to put --tag disable-shared after --tag CXX lest things # CXX undo the affect of disable-shared. -LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -471,9 +471,11 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=link $(CXX) \ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ +CXXLINK = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ # Install notes diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index eb80bfecdd7..a1eb04dabf3 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -29,10 +29,37 @@ SUBDIRS = c++98 c++11 # Cross compiler support. toolexeclib_LTLIBRARIES = libstdc++.la -vpath % $(top_srcdir)/src -vpath % $(top_srcdir) +vpath % $(top_srcdir)/src/c++98 +vpath % $(top_srcdir)/src/c++11 -libstdc___la_SOURCES = +if GLIBCXX_LDBL_COMPAT +ldbl_compat_sources = compatibility-ldbl.cc +else +ldbl_compat_sources = +endif + +if ENABLE_PARALLEL +parallel_compat_sources = \ + compatibility-parallel_list.cc compatibility-parallel_list-2.cc +else +parallel_compat_sources = +endif + +cxx98_sources = \ + compatibility.cc \ + compatibility-debug_list.cc \ + compatibility-debug_list-2.cc \ + compatibility-list.cc \ + compatibility-list-2.cc \ + ${ldbl_compat_sources} \ + ${parallel_compat_sources} + +cxx11_sources = \ + compatibility-c++0x.cc \ + compatibility-atomic-c++0x.cc \ + compatibility-thread-c++0x.cc + +libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources) libstdc___la_LIBADD = \ $(GLIBCXX_LIBS) \ @@ -52,6 +79,43 @@ libstdc___la_LDFLAGS = \ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) +# Use special rules for parallel mode compilation. +PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp +compatibility-parallel_list.lo: compatibility-parallel_list.cc + $(LTCXXCOMPILE) -c $< +compatibility-parallel_list.o: compatibility-parallel_list.cc + $(CXXCOMPILE) -c $< + +compatibility-parallel_list-2.lo: compatibility-parallel_list-2.cc + $(LTCXXCOMPILE) -c $< +compatibility-parallel_list-2.o: compatibility-parallel_list-2.cc + $(CXXCOMPILE) -c $< + +# Use special rules for compatibility-ldbl.cc compilation, as we need to +# pass -mlong-double-64. +if GLIBCXX_LDBL_COMPAT +compatibility-ldbl.lo: compatibility-ldbl.cc + $(LTCXXCOMPILE) -mlong-double-64 -c $< +compatibility-ldbl.o: compatibility-ldbl.cc + $(CXXCOMPILE) -mlong-double-64 -c $< +endif + +# Use special rules for C++11 files/objects. +compatibility-c++0x.lo: compatibility-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-c++0x.o: compatibility-c++0x.cc + $(CXXCOMPILE) -std=gnu++11 -c $< + +compatibility-atomic-c++0x.lo: compatibility-atomic-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-atomic-c++0x.o: compatibility-atomic-c++0x.cc + $(CXXCOMPILE) -std=gnu++11 -c $< + +compatibility-thread-c++0x.lo: compatibility-thread-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-thread-c++0x.o: compatibility-thread-c++0x.cc + $(CXXCOMPILE) -std=gnu++11 -c $< + # AM_CXXFLAGS needs to be in each subdirectory so that it can be # modified in a per-library or per-sub-library way. Need to manually # set this option because CONFIG_CXXFLAGS has to be after @@ -59,12 +123,9 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) # as the occasion calls for it. AM_CXXFLAGS = \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) - + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) -# libstdc++ libtool notes +# 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 @@ -82,10 +143,11 @@ AM_CXXFLAGS = \ # 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 -LTCXXCOMPILE = $(LIBTOOL) --tag CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ - $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -95,8 +157,12 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CXX) $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ +CXXLINK = \ + $(LIBTOOL) --tag CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ + # Symbol versioning for shared libraries. if ENABLE_SYMVERS @@ -116,7 +182,7 @@ libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \ fi; \ fi $(EGREP) -v '^[ ]*#(#| |$$)' $@.tmp | \ - $(COMPILE) -E -P -include config.h - > $@ || (rm -f $@ ; exit 1) + $(CC) -E -P -include ../config.h - > $@ || (rm -f $@ ; exit 1) rm -f $@.tmp CLEANFILES = libstdc++-symbols.ver @@ -165,7 +231,6 @@ endif # Control additional build primary rules. -# EXTRA_LTLIBRARIES = all-once: libstdc++convenience.la $(STAMP_DEBUG) install-data-once: $(STAMP_INSTALL_DEBUG) @@ -228,7 +293,7 @@ build-debug: stamp-debug mv Makefile Makefile.tmp; \ sed -e 's,all-local: all-once,all-local:,' \ -e 's,install-data-local: install-data-once,install-data-local:,' \ - -e 's,src/c,src/debug/c,' \ + -e '/vpath/!s,src/c,src/debug/c,' \ < Makefile.tmp > Makefile ; \ $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ; diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 34c0a3156ed..b10d853af49 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -88,20 +88,22 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) am__DEPENDENCIES_1 = -am_libstdc___la_OBJECTS = +@GLIBCXX_LDBL_COMPAT_TRUE@am__objects_1 = compatibility-ldbl.lo +@ENABLE_PARALLEL_TRUE@am__objects_2 = compatibility-parallel_list.lo \ +@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list-2.lo +am__objects_3 = compatibility.lo compatibility-debug_list.lo \ + compatibility-debug_list-2.lo compatibility-list.lo \ + compatibility-list-2.lo $(am__objects_1) $(am__objects_2) +am__objects_4 = compatibility-c++0x.lo compatibility-atomic-c++0x.lo \ + compatibility-thread-c++0x.lo +am_libstdc___la_OBJECTS = $(am__objects_3) $(am__objects_4) libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) SOURCES = $(libstdc___la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ @@ -331,7 +333,27 @@ SUBDIRS = c++98 c++11 # Cross compiler support. toolexeclib_LTLIBRARIES = libstdc++.la -libstdc___la_SOURCES = +@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = +@GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc +@ENABLE_PARALLEL_FALSE@parallel_compat_sources = +@ENABLE_PARALLEL_TRUE@parallel_compat_sources = \ +@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list.cc compatibility-parallel_list-2.cc + +cxx98_sources = \ + compatibility.cc \ + compatibility-debug_list.cc \ + compatibility-debug_list-2.cc \ + compatibility-list.cc \ + compatibility-list-2.cc \ + ${ldbl_compat_sources} \ + ${parallel_compat_sources} + +cxx11_sources = \ + compatibility-c++0x.cc \ + compatibility-atomic-c++0x.cc \ + compatibility-thread-c++0x.cc + +libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources) libstdc___la_LIBADD = \ $(GLIBCXX_LIBS) \ $(top_builddir)/libsupc++/libsupc++convenience.la \ @@ -349,6 +371,9 @@ libstdc___la_LDFLAGS = \ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) +# Use special rules for parallel mode compilation. +PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp + # AM_CXXFLAGS needs to be in each subdirectory so that it can be # modified in a per-library or per-sub-library way. Need to manually # set this option because CONFIG_CXXFLAGS has to be after @@ -356,12 +381,10 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) # as the occasion calls for it. AM_CXXFLAGS = \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) -# libstdc++ libtool notes +# 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 @@ -379,10 +402,11 @@ AM_CXXFLAGS = \ # 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 -LTCXXCOMPILE = $(LIBTOOL) --tag CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ - $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -392,8 +416,11 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CXX) $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ +CXXLINK = \ + $(LIBTOOL) --tag CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ @ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep) @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,-exported_symbols_list,libstdc++-symbols.explist @@ -423,6 +450,7 @@ debugdir = ${glibcxx_builddir}/src/debug all: all-recursive .SUFFIXES: +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -493,6 +521,15 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +.cc.o: + $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: + $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: + $(LTCXXCOMPILE) -c -o $@ $< + mostlyclean-libtool: -rm -f *.lo @@ -757,8 +794,40 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES uninstall-toolexeclibLTLIBRARIES -vpath % $(top_srcdir)/src -vpath % $(top_srcdir) +vpath % $(top_srcdir)/src/c++98 +vpath % $(top_srcdir)/src/c++11 +compatibility-parallel_list.lo: compatibility-parallel_list.cc + $(LTCXXCOMPILE) -c $< +compatibility-parallel_list.o: compatibility-parallel_list.cc + $(CXXCOMPILE) -c $< + +compatibility-parallel_list-2.lo: compatibility-parallel_list-2.cc + $(LTCXXCOMPILE) -c $< +compatibility-parallel_list-2.o: compatibility-parallel_list-2.cc + $(CXXCOMPILE) -c $< + +# Use special rules for compatibility-ldbl.cc compilation, as we need to +# pass -mlong-double-64. +@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc +@GLIBCXX_LDBL_COMPAT_TRUE@ $(LTCXXCOMPILE) -mlong-double-64 -c $< +@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.o: compatibility-ldbl.cc +@GLIBCXX_LDBL_COMPAT_TRUE@ $(CXXCOMPILE) -mlong-double-64 -c $< + +# Use special rules for C++11 files/objects. +compatibility-c++0x.lo: compatibility-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-c++0x.o: compatibility-c++0x.cc + $(CXXCOMPILE) -std=gnu++11 -c $< + +compatibility-atomic-c++0x.lo: compatibility-atomic-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-atomic-c++0x.o: compatibility-atomic-c++0x.cc + $(CXXCOMPILE) -std=gnu++11 -c $< + +compatibility-thread-c++0x.lo: compatibility-thread-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-thread-c++0x.o: compatibility-thread-c++0x.cc + $(CXXCOMPILE) -std=gnu++11 -c $< # Symbol versioning for shared libraries. @ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \ @@ -777,7 +846,7 @@ vpath % $(top_srcdir) @ENABLE_SYMVERS_TRUE@ fi; \ @ENABLE_SYMVERS_TRUE@ fi @ENABLE_SYMVERS_TRUE@ $(EGREP) -v '^[ ]*#(#| |$$)' $@.tmp | \ -@ENABLE_SYMVERS_TRUE@ $(COMPILE) -E -P -include config.h - > $@ || (rm -f $@ ; exit 1) +@ENABLE_SYMVERS_TRUE@ $(CC) -E -P -include ../config.h - > $@ || (rm -f $@ ; exit 1) @ENABLE_SYMVERS_TRUE@ rm -f $@.tmp @ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver-sun : libstdc++-symbols.ver \ @ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(toplevel_srcdir)/contrib/make_sunver.pl \ @@ -800,7 +869,6 @@ vpath % $(top_srcdir) @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ > $@ || (rm -f $@ ; exit 1) # Control additional build primary rules. -# EXTRA_LTLIBRARIES = all-once: libstdc++convenience.la $(STAMP_DEBUG) install-data-once: $(STAMP_INSTALL_DEBUG) @@ -846,7 +914,7 @@ build-debug: stamp-debug mv Makefile Makefile.tmp; \ sed -e 's,all-local: all-once,all-local:,' \ -e 's,install-data-local: install-data-once,install-data-local:,' \ - -e 's,src/c,src/debug/c,' \ + -e '/vpath/!s,src/c,src/debug/c,' \ < Makefile.tmp > Makefile ; \ $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ; diff --git a/libstdc++-v3/src/c++11/Makefile.am b/libstdc++-v3/src/c++11/Makefile.am index 395af5c8579..e8a4d3a66f9 100644 --- a/libstdc++-v3/src/c++11/Makefile.am +++ b/libstdc++-v3/src/c++11/Makefile.am @@ -32,8 +32,6 @@ headers = sources = \ chrono.cc \ condition_variable.cc \ - compatibility-c++0x.cc \ - compatibility-atomic-c++0x.cc \ debug.cc \ functexcept.cc \ functional.cc \ @@ -60,7 +58,6 @@ inst_sources = endif vpath % $(top_srcdir)/src/c++11 -vpath % $(top_srcdir) libc__11convenience_la_SOURCES = $(sources) $(inst_sources) @@ -70,11 +67,10 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources) # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden # as the occasion calls for it. AM_CXXFLAGS = \ + -std=gnu++11 \ $(PIC_CXXFLAGS) \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) -std=gnu++11 + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" @@ -99,9 +95,11 @@ AM_MAKEFLAGS = \ # 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. -LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -111,6 +109,8 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=link $(CXX) \ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ +CXXLINK = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in index b7f362af689..0c63c514741 100644 --- a/libstdc++-v3/src/c++11/Makefile.in +++ b/libstdc++-v3/src/c++11/Makefile.in @@ -66,11 +66,10 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libc__11convenience_la_LIBADD = -am__objects_1 = chrono.lo condition_variable.lo compatibility-c++0x.lo \ - compatibility-atomic-c++0x.lo debug.lo functexcept.lo \ - functional.lo future.lo hash_c++0x.lo hashtable_c++0x.lo \ - limits.lo mutex.lo placeholders.lo regex.lo shared_ptr.lo \ - system_error.lo thread.lo +am__objects_1 = chrono.lo condition_variable.lo debug.lo \ + functexcept.lo functional.lo future.lo hash_c++0x.lo \ + hashtable_c++0x.lo limits.lo mutex.lo placeholders.lo regex.lo \ + shared_ptr.lo system_error.lo thread.lo @ENABLE_EXTERN_TEMPLATE_TRUE@am__objects_2 = fstream-inst.lo \ @ENABLE_EXTERN_TEMPLATE_TRUE@ string-inst.lo wstring-inst.lo am_libc__11convenience_la_OBJECTS = $(am__objects_1) $(am__objects_2) @@ -301,8 +300,6 @@ headers = sources = \ chrono.cc \ condition_variable.cc \ - compatibility-c++0x.cc \ - compatibility-atomic-c++0x.cc \ debug.cc \ functexcept.cc \ functional.cc \ @@ -333,11 +330,10 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources) # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden # as the occasion calls for it. AM_CXXFLAGS = \ + -std=gnu++11 \ $(PIC_CXXFLAGS) \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) -std=gnu++11 + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" @@ -363,9 +359,11 @@ AM_MAKEFLAGS = \ # 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. -LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -375,9 +373,11 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=link $(CXX) \ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ +CXXLINK = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ all: all-am @@ -612,7 +612,6 @@ uninstall-am: vpath % $(top_srcdir)/src/c++11 -vpath % $(top_srcdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. 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 1ee0d7e35a8..8ccad9330ed 100644 --- a/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc +++ b/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc @@ -1,6 +1,6 @@ // compatibility -*- C++ -*- -// Copyright (C) 2008, 2009, 2010, 2011 +// 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 @@ -30,6 +30,8 @@ // XXX GLIBCXX_ABI Deprecated // gcc-4.7.0 +#ifdef PIC + #define LOGSIZE 4 namespace @@ -133,6 +135,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace std +#endif // XXX GLIBCXX_ABI Deprecated // gcc-4.5.0 diff --git a/libstdc++-v3/src/c++11/compatibility-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-c++0x.cc index 03c58d244f2..bd5dbe0ff06 100644 --- a/libstdc++-v3/src/c++11/compatibility-c++0x.cc +++ b/libstdc++-v3/src/c++11/compatibility-c++0x.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions, C++0x bits -*- C++ -*- -// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -30,6 +30,8 @@ # error "compatibility-c++0x.cc must be compiled with -std=gnu++0x" #endif +#ifdef PIC + namespace std _GLIBCXX_VISIBILITY(default) { // gcc-4.4.0 @@ -119,3 +121,4 @@ namespace std _GLIBCXX_VISIBILITY(default) } // namespace chrono } +#endif diff --git a/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc new file mode 100644 index 00000000000..cc8761eea15 --- /dev/null +++ b/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc @@ -0,0 +1,72 @@ +// Compatibility symbols for previous versions, C++0x bits -*- C++ -*- + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +#include +#include + +#ifndef __GXX_EXPERIMENTAL_CXX0X__ +# error "compatibility-c++0x.cc must be compiled with -std=gnu++0x" +#endif + +#define _GLIBCXX_ASM_SYMVER(cur, old, version) \ + asm (".symver " #cur "," #old "@@@" #version); + +// XXX GLIBCXX_ABI Deprecated +// gcc-4.6.0 +// export changes +#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) + +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ + const std::error_category* future_category = &std::future_category(); +} + +_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx15future_categoryE, _ZSt15future_category, GLIBCXX_3.4.14) + +#endif + +// XXX GLIBCXX_ABI Deprecated +// gcc-4.6.0 +// export changes +#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) +#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) + +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ + std::defer_lock_t defer_lock; + std::try_to_lock_t try_to_lock; + std::adopt_lock_t adopt_lock; +} + +_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx10adopt_lockE, _ZSt10adopt_lock, GLIBCXX_3.4.11) +_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx10defer_lockE, _ZSt10defer_lock, GLIBCXX_3.4.11) +_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx11try_to_lockE, _ZSt11try_to_lock, GLIBCXX_3.4.11) + + +#endif +#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc index a4881397523..380c3a45185 100644 --- a/libstdc++-v3/src/c++11/future.cc +++ b/libstdc++-v3/src/c++11/future.cc @@ -96,23 +96,3 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace std - -// XXX GLIBCXX_ABI Deprecated -// gcc-4.6.0 -// export changes -#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ - && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ - && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) - -namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) -{ - const std::error_category* future_category = &__future_category_instance(); -} - -#define _GLIBCXX_ASM_SYMVER(cur, old, version) \ - asm (".symver " #cur "," #old "@@@" #version); - -_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx15future_categoryE, _ZSt15future_category, GLIBCXX_3.4.14) - -#endif - diff --git a/libstdc++-v3/src/c++11/mutex.cc b/libstdc++-v3/src/c++11/mutex.cc index d6f2f03700f..86d0293473f 100644 --- a/libstdc++-v3/src/c++11/mutex.cc +++ b/libstdc++-v3/src/c++11/mutex.cc @@ -1,6 +1,6 @@ // mutex -*- C++ -*- -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 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 @@ -92,30 +92,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } _GLIBCXX_END_NAMESPACE_VERSION -} // namespace - -// XXX GLIBCXX_ABI Deprecated -// gcc-4.6.0 -// export changes -#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ - && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ - && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) - -namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) -{ - std::defer_lock_t defer_lock; - std::try_to_lock_t try_to_lock; - std::adopt_lock_t adopt_lock; -} - -#define _GLIBCXX_ASM_SYMVER(cur, old, version) \ - asm (".symver " #cur "," #old "@@" #version); - -_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx10adopt_lockE, _ZSt10adopt_lock, GLIBCXX_3.4.11) -_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx10defer_lockE, _ZSt10defer_lock, GLIBCXX_3.4.11) -_GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx11try_to_lockE, _ZSt11try_to_lock, GLIBCXX_3.4.11) - - -#endif +} // namespace std #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am index e960d948cf8..05767e9ff23 100644 --- a/libstdc++-v3/src/c++98/Makefile.am +++ b/libstdc++-v3/src/c++98/Makefile.am @@ -25,7 +25,7 @@ include $(top_srcdir)/fragment.am # Convenience library for C++98 runtime. -noinst_LTLIBRARIES = libc++98convenience.la +noinst_LTLIBRARIES = libc++98convenience.la headers = @@ -74,7 +74,7 @@ atomicity.cc: ${atomicity_file} # particular host, but with ad hoc naming rules. host_sources_extra = \ basic_file.cc c++locale.cc \ - ${inst_sources} ${ldbl_compat_sources} ${parallel_sources} + ${inst_sources} ${parallel_sources} c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC) $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true @@ -83,19 +83,11 @@ basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC) $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true if ENABLE_PARALLEL -parallel_sources = parallel_settings.cc \ - compatibility-parallel_list.cc \ - compatibility-parallel_list-2.cc +parallel_sources = parallel_settings.cc else parallel_sources = endif -if GLIBCXX_LDBL_COMPAT -ldbl_compat_sources = compatibility-ldbl.cc -else -ldbl_compat_sources = -endif - if ENABLE_EXTERN_TEMPLATE XTEMPLATE_FLAGS = -fno-implicit-templates inst_sources = \ @@ -122,11 +114,6 @@ sources = \ pool_allocator.cc \ mt_allocator.cc \ codecvt.cc \ - compatibility.cc \ - compatibility-debug_list.cc \ - compatibility-debug_list-2.cc \ - compatibility-list.cc \ - compatibility-list-2.cc \ complex_io.cc \ ctype.cc \ globals_io.cc \ @@ -153,7 +140,6 @@ sources = \ ${host_sources_extra} vpath % $(top_srcdir)/src/c++98 -vpath % $(top_srcdir) libc__98convenience_la_SOURCES = $(sources) @@ -180,25 +166,6 @@ parallel_settings.lo: parallel_settings.cc parallel_settings.o: parallel_settings.cc $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< -compatibility-parallel_list.lo: compatibility-parallel_list.cc - $(LTCXXCOMPILE) -c $< -compatibility-parallel_list.o: compatibility-parallel_list.cc - $(CXXCOMPILE) -c $< - -compatibility-parallel_list-2.lo: compatibility-parallel_list-2.cc - $(LTCXXCOMPILE) -c $< -compatibility-parallel_list-2.o: compatibility-parallel_list-2.cc - $(CXXCOMPILE) -c $< - -if GLIBCXX_LDBL_COMPAT -# Use special rules for compatibility-ldbl.cc compilation, as we need to -# pass -mlong-double-64. -compatibility-ldbl.lo: compatibility-ldbl.cc - $(LTCXXCOMPILE) -mlong-double-64 -c $< -compatibility-ldbl.o: compatibility-ldbl.cc - $(CXXCOMPILE) -mlong-double-64 -c $< -endif - # AM_CXXFLAGS needs to be in each subdirectory so that it can be # modified in a per-library or per-sub-library way. Need to manually # set this option because CONFIG_CXXFLAGS has to be after @@ -207,9 +174,7 @@ endif AM_CXXFLAGS = \ $(PIC_CXXFLAGS) \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" @@ -234,9 +199,11 @@ AM_MAKEFLAGS = \ # 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. -LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -246,6 +213,8 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=link $(CXX) \ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ +CXXLINK = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in index b0e6c14d048..f36742ba021 100644 --- a/libstdc++-v3/src/c++98/Makefile.in +++ b/libstdc++-v3/src/c++98/Makefile.in @@ -76,23 +76,18 @@ am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \ @ENABLE_EXTERN_TEMPLATE_TRUE@ misc-inst.lo ostream-inst.lo \ @ENABLE_EXTERN_TEMPLATE_TRUE@ sstream-inst.lo streambuf-inst.lo \ @ENABLE_EXTERN_TEMPLATE_TRUE@ wlocale-inst.lo -@GLIBCXX_LDBL_COMPAT_TRUE@am__objects_3 = compatibility-ldbl.lo -@ENABLE_PARALLEL_TRUE@am__objects_4 = parallel_settings.lo \ -@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list.lo \ -@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list-2.lo -am__objects_5 = basic_file.lo c++locale.lo $(am__objects_2) \ - $(am__objects_3) $(am__objects_4) -am__objects_6 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \ - codecvt.lo compatibility.lo compatibility-debug_list.lo \ - compatibility-debug_list-2.lo compatibility-list.lo \ - compatibility-list-2.lo complex_io.lo ctype.lo globals_io.lo \ - hash_tr1.lo hashtable_tr1.lo ios.lo ios_failure.lo ios_init.lo \ +@ENABLE_PARALLEL_TRUE@am__objects_3 = parallel_settings.lo +am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \ + $(am__objects_3) +am__objects_5 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \ + codecvt.lo complex_io.lo ctype.lo globals_io.lo hash_tr1.lo \ + hashtable_tr1.lo ios.lo ios_failure.lo ios_init.lo \ ios_locale.lo list.lo locale.lo locale_init.lo \ locale_facets.lo localename.lo math_stubs_float.lo \ math_stubs_long_double.lo stdexcept.lo strstream.lo tree.lo \ istream.lo streambuf.lo valarray.lo $(am__objects_1) \ - $(am__objects_5) -am_libc__98convenience_la_OBJECTS = $(am__objects_6) + $(am__objects_4) +am_libc__98convenience_la_OBJECTS = $(am__objects_5) libc__98convenience_la_OBJECTS = $(am_libc__98convenience_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = @@ -315,7 +310,7 @@ WARN_CXXFLAGS = \ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) # Convenience library for C++98 runtime. -noinst_LTLIBRARIES = libc++98convenience.la +noinst_LTLIBRARIES = libc++98convenience.la headers = # Source files linked in via configuration/make substitution for a @@ -337,15 +332,10 @@ atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h # particular host, but with ad hoc naming rules. host_sources_extra = \ basic_file.cc c++locale.cc \ - ${inst_sources} ${ldbl_compat_sources} ${parallel_sources} + ${inst_sources} ${parallel_sources} @ENABLE_PARALLEL_FALSE@parallel_sources = -@ENABLE_PARALLEL_TRUE@parallel_sources = parallel_settings.cc \ -@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list.cc \ -@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list-2.cc - -@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = -@GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc +@ENABLE_PARALLEL_TRUE@parallel_sources = parallel_settings.cc @ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = @ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates @ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = @@ -370,11 +360,6 @@ sources = \ pool_allocator.cc \ mt_allocator.cc \ codecvt.cc \ - compatibility.cc \ - compatibility-debug_list.cc \ - compatibility-debug_list-2.cc \ - compatibility-list.cc \ - compatibility-list-2.cc \ complex_io.cc \ ctype.cc \ globals_io.cc \ @@ -417,9 +402,7 @@ PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp AM_CXXFLAGS = \ $(PIC_CXXFLAGS) \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" @@ -445,9 +428,11 @@ AM_MAKEFLAGS = \ # 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. -LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -457,9 +442,11 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=link $(CXX) \ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ +CXXLINK = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ all: all-am @@ -726,7 +713,6 @@ basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC) $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true vpath % $(top_srcdir)/src/c++98 -vpath % $(top_srcdir) strstream.lo: strstream.cc $(LTCXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $< strstream.o: strstream.cc @@ -744,23 +730,6 @@ parallel_settings.lo: parallel_settings.cc parallel_settings.o: parallel_settings.cc $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< -compatibility-parallel_list.lo: compatibility-parallel_list.cc - $(LTCXXCOMPILE) -c $< -compatibility-parallel_list.o: compatibility-parallel_list.cc - $(CXXCOMPILE) -c $< - -compatibility-parallel_list-2.lo: compatibility-parallel_list-2.cc - $(LTCXXCOMPILE) -c $< -compatibility-parallel_list-2.o: compatibility-parallel_list-2.cc - $(CXXCOMPILE) -c $< - -# Use special rules for compatibility-ldbl.cc compilation, as we need to -# pass -mlong-double-64. -@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc -@GLIBCXX_LDBL_COMPAT_TRUE@ $(LTCXXCOMPILE) -mlong-double-64 -c $< -@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.o: compatibility-ldbl.cc -@GLIBCXX_LDBL_COMPAT_TRUE@ $(CXXCOMPILE) -mlong-double-64 -c $< - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libstdc++-v3/src/c++98/compatibility-ldbl.cc b/libstdc++-v3/src/c++98/compatibility-ldbl.cc index a103856adfa..da09d54bbf4 100644 --- a/libstdc++-v3/src/c++98/compatibility-ldbl.cc +++ b/libstdc++-v3/src/c++98/compatibility-ldbl.cc @@ -1,6 +1,6 @@ // Compatibility symbols for -mlong-double-64 compatibility -*- C++ -*- -// Copyright (C) 2006, 2008, 2009, 2010, 2011 +// Copyright (C) 2006, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free diff --git a/libstdc++-v3/src/c++98/compatibility-list-2.cc b/libstdc++-v3/src/c++98/compatibility-list-2.cc index ac69798740d..975450cb100 100644 --- a/libstdc++-v3/src/c++98/compatibility-list-2.cc +++ b/libstdc++-v3/src/c++98/compatibility-list-2.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions, list bits -*- C++ -*- -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -24,6 +24,8 @@ #include +#ifdef PIC + #ifndef _GLIBCXX_BEGIN_NAMESPACE_COMPAT # define _GLIBCXX_BEGIN_NAMESPACE_COMPAT #endif @@ -111,3 +113,5 @@ _GLIBCXX_BEGIN_NAMESPACE_COMPAT _GLIBCXX_END_NAMESPACE_COMPAT } // namespace std + +#endif diff --git a/libstdc++-v3/src/c++98/compatibility-list.cc b/libstdc++-v3/src/c++98/compatibility-list.cc index a0d706b27a9..7e074a72971 100644 --- a/libstdc++-v3/src/c++98/compatibility-list.cc +++ b/libstdc++-v3/src/c++98/compatibility-list.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions, list bits -*- C++ -*- -// Copyright (C) 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 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 diff --git a/libstdc++-v3/src/c++98/compatibility.cc b/libstdc++-v3/src/c++98/compatibility.cc index d4cf5d7c122..38d9e4b6743 100644 --- a/libstdc++-v3/src/c++98/compatibility.cc +++ b/libstdc++-v3/src/c++98/compatibility.cc @@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif _GLIBCXX_END_NAMESPACE_VERSION -} // namespace +} // namespace std // NB: These symbols renames should go into the shared library only, @@ -228,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif _GLIBCXX_END_NAMESPACE_VERSION -} // namespace +} // namespace std /* gcc-4.0.0 @@ -357,7 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif _GLIBCXX_END_NAMESPACE_VERSION -} // namespace +} // namespace std // The rename syntax for default exported names is // asm (".symver name1,exportedname@GLIBCXX_3.4") -- 2.11.0