summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-04 21:51:56 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-04 21:51:56 +0000
commitcb38c7e01674250d91499b4e2aa140ba501ed449 (patch)
tree2e800ce8e0059816299afffdfdecfae29dbbb082 /libstdc++-v3/src
parentcf8ffe7df91cfb5197fb48190a5f925343968fe8 (diff)
downloadgcc-cb38c7e01674250d91499b4e2aa140ba501ed449.tar.gz
2011-03-04 Benjamin Kosnik <bkoz@chula>
* src/Makefile.am (inst_sources): Make source instantion files conditional. (XTEMPLATE_FLAGS): Make -fno-implicit-templates conditional. * src/Makefile.in: Regenerate. * src/valarray-inst.cc: Move to.. * src/valarray.cc: ...this. * acinclude.m4 (GLIBCXX_ENABLE_EXTERN_TEMPLATE]): Define. * configure.ac (GLIBCXX_ENABLE_EXTERN_TEMPLATE): Use it. * configure: Regenerate. * include/Makefile.am (stamp-extern-template): Add. * include/Makefile.in: Regenerate. * doc/xml/manual/configure.xml: Document --enable-extern-template. * include/bits/locale_classes.tcc: Adjust comment. * include/bits/locale_facets.tcc: Same. * include/bits/basic_ios.tcc: Same. * include/bits/istream.tcc: Same. * include/bits/codecvt.h: Same. * include/bits/ostream.tcc: Same. * include/bits/sstream.tcc: Same. * include/bits/c++config: Same. * include/bits/basic_string.tcc: Same. * include/bits/ostream_insert.h: Same. * include/bits/locale_facets_nonio.tcc: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/fstream.tcc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/Makefile.am65
-rw-r--r--libstdc++-v3/src/Makefile.in92
-rw-r--r--libstdc++-v3/src/valarray.cc (renamed from libstdc++-v3/src/valarray-inst.cc)0
3 files changed, 90 insertions, 67 deletions
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 5524a774e31..f52993b54cb 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -1,7 +1,7 @@
## Makefile for the src subdirectory of the GNU C++ Standard library.
##
## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-## 2006, 2007, 2008, 2009, 2010
+## 2006, 2007, 2008, 2009, 2010, 2011
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
@@ -108,7 +108,7 @@ host_sources = \
messages_members.cc \
monetary_members.cc \
numeric_members.cc \
- time_members.cc
+ time_members.cc
codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC)
$(LN_S) ${glibcxx_srcdir}/$(CCODECVT_CC) . || true
@@ -138,7 +138,8 @@ atomicity.cc: ${atomicity_file}
# Source files linked in via configuration/make substitution for a
# particular host, but with ad hoc naming rules.
host_sources_extra = \
- basic_file.cc c++locale.cc ${ldbl_compat_sources} ${parallel_sources}
+ basic_file.cc c++locale.cc \
+ ${inst_sources} ${ldbl_compat_sources} ${parallel_sources}
c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true
@@ -148,8 +149,8 @@ basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
if ENABLE_PARALLEL
parallel_sources = parallel_settings.cc \
- compatibility-parallel_list.cc \
- compatibility-parallel_list-2.cc
+ compatibility-parallel_list.cc \
+ compatibility-parallel_list-2.cc
else
parallel_sources =
endif
@@ -160,7 +161,30 @@ else
ldbl_compat_sources =
endif
-# Sources present in the src directory.
+if ENABLE_EXTERN_TEMPLATE
+XTEMPLATE_FLAGS = -fno-implicit-templates
+inst_sources = \
+ allocator-inst.cc \
+ concept-inst.cc \
+ ext-inst.cc \
+ fstream-inst.cc \
+ ios-inst.cc \
+ iostream-inst.cc \
+ istream-inst.cc \
+ locale-inst.cc \
+ misc-inst.cc \
+ ostream-inst.cc \
+ sstream-inst.cc \
+ streambuf-inst.cc \
+ string-inst.cc \
+ wlocale-inst.cc \
+ wstring-inst.cc
+else
+XTEMPLATE_FLAGS =
+inst_sources =
+endif
+
+# Sources present in the src directory, always present.
sources = \
atomic.cc \
bitmap_allocator.cc \
@@ -198,33 +222,18 @@ sources = \
strstream.cc \
system_error.cc \
tree.cc \
- allocator-inst.cc \
- concept-inst.cc \
- fstream-inst.cc \
- ext-inst.cc \
- ios-inst.cc \
- iostream-inst.cc \
- istream-inst.cc \
istream.cc \
- locale-inst.cc \
- misc-inst.cc \
- ostream-inst.cc \
placeholders.cc \
regex.cc \
- sstream-inst.cc \
- streambuf-inst.cc \
streambuf.cc \
- string-inst.cc \
- valarray-inst.cc \
- wlocale-inst.cc \
- wstring-inst.cc \
mutex.cc \
condition_variable.cc \
chrono.cc \
thread.cc \
future.cc \
+ valarray.cc \
${host_sources} \
- ${host_sources_extra}
+ ${host_sources_extra}
vpath % $(top_srcdir)/src
vpath % $(top_srcdir)
@@ -240,7 +249,7 @@ libstdc___la_DEPENDENCIES = \
$(top_builddir)/libsupc++/libsupc++convenience.la
libstdc___la_LDFLAGS = \
- -version-info $(libtool_VERSION) ${version_arg} -lm
+ -version-info $(libtool_VERSION) ${version_arg} -lm
libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
@@ -383,7 +392,7 @@ endif
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
- -fno-implicit-templates \
+ $(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
$(CONFIG_CXXFLAGS)
@@ -407,8 +416,10 @@ 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))
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 956cbb9e4ad..9b65811f2c4 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -91,13 +91,21 @@ am__DEPENDENCIES_1 =
am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \
ctype_members.lo messages_members.lo monetary_members.lo \
numeric_members.lo time_members.lo
-@GLIBCXX_LDBL_COMPAT_TRUE@am__objects_2 = compatibility-ldbl.lo
-@ENABLE_PARALLEL_TRUE@am__objects_3 = parallel_settings.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@am__objects_2 = allocator-inst.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ concept-inst.lo ext-inst.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ fstream-inst.lo ios-inst.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ iostream-inst.lo istream-inst.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ locale-inst.lo misc-inst.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ ostream-inst.lo sstream-inst.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ streambuf-inst.lo string-inst.lo \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ wlocale-inst.lo wstring-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_4 = basic_file.lo c++locale.lo $(am__objects_2) \
- $(am__objects_3)
-am__objects_5 = atomic.lo bitmap_allocator.lo pool_allocator.lo \
+am__objects_5 = basic_file.lo c++locale.lo $(am__objects_2) \
+ $(am__objects_3) $(am__objects_4)
+am__objects_6 = atomic.lo bitmap_allocator.lo pool_allocator.lo \
mt_allocator.lo codecvt.lo compatibility.lo \
compatibility-c++0x.lo compatibility-debug_list.lo \
compatibility-debug_list-2.lo compatibility-list.lo \
@@ -107,15 +115,11 @@ am__objects_5 = atomic.lo bitmap_allocator.lo pool_allocator.lo \
ios_init.lo ios_locale.lo limits.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 system_error.lo tree.lo allocator-inst.lo \
- concept-inst.lo fstream-inst.lo ext-inst.lo ios-inst.lo \
- iostream-inst.lo istream-inst.lo istream.lo locale-inst.lo \
- misc-inst.lo ostream-inst.lo placeholders.lo regex.lo \
- sstream-inst.lo streambuf-inst.lo streambuf.lo string-inst.lo \
- valarray-inst.lo wlocale-inst.lo wstring-inst.lo mutex.lo \
+ strstream.lo system_error.lo tree.lo istream.lo \
+ placeholders.lo regex.lo streambuf.lo mutex.lo \
condition_variable.lo chrono.lo thread.lo future.lo \
- $(am__objects_1) $(am__objects_4)
-am_libstdc___la_OBJECTS = $(am__objects_5)
+ valarray.lo $(am__objects_1) $(am__objects_5)
+am_libstdc___la_OBJECTS = $(am__objects_6)
libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp =
@@ -360,24 +364,45 @@ host_sources = \
messages_members.cc \
monetary_members.cc \
numeric_members.cc \
- time_members.cc
+ time_members.cc
atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h
# Source files linked in via configuration/make substitution for a
# particular host, but with ad hoc naming rules.
host_sources_extra = \
- basic_file.cc c++locale.cc ${ldbl_compat_sources} ${parallel_sources}
+ basic_file.cc c++locale.cc \
+ ${inst_sources} ${ldbl_compat_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
+@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
-
-# Sources present in the src directory.
+@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS =
+@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates
+@ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources =
+@ENABLE_EXTERN_TEMPLATE_TRUE@inst_sources = \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ allocator-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ concept-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ ext-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ fstream-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ ios-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ iostream-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ istream-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ locale-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ misc-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ ostream-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ sstream-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ streambuf-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ string-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ wlocale-inst.cc \
+@ENABLE_EXTERN_TEMPLATE_TRUE@ wstring-inst.cc
+
+
+# Sources present in the src directory, always present.
sources = \
atomic.cc \
bitmap_allocator.cc \
@@ -415,33 +440,18 @@ sources = \
strstream.cc \
system_error.cc \
tree.cc \
- allocator-inst.cc \
- concept-inst.cc \
- fstream-inst.cc \
- ext-inst.cc \
- ios-inst.cc \
- iostream-inst.cc \
- istream-inst.cc \
istream.cc \
- locale-inst.cc \
- misc-inst.cc \
- ostream-inst.cc \
placeholders.cc \
regex.cc \
- sstream-inst.cc \
- streambuf-inst.cc \
streambuf.cc \
- string-inst.cc \
- valarray-inst.cc \
- wlocale-inst.cc \
- wstring-inst.cc \
mutex.cc \
condition_variable.cc \
chrono.cc \
thread.cc \
future.cc \
+ valarray.cc \
${host_sources} \
- ${host_sources_extra}
+ ${host_sources_extra}
libstdc___la_SOURCES = $(sources)
libstdc___la_LIBADD = \
@@ -453,7 +463,7 @@ libstdc___la_DEPENDENCIES = \
$(top_builddir)/libsupc++/libsupc++convenience.la
libstdc___la_LDFLAGS = \
- -version-info $(libtool_VERSION) ${version_arg} -lm
+ -version-info $(libtool_VERSION) ${version_arg} -lm
libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
@@ -470,7 +480,7 @@ PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
- -fno-implicit-templates \
+ $(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
$(CONFIG_CXXFLAGS)
@@ -494,8 +504,10 @@ 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))
diff --git a/libstdc++-v3/src/valarray-inst.cc b/libstdc++-v3/src/valarray.cc
index 4d21ab171ba..4d21ab171ba 100644
--- a/libstdc++-v3/src/valarray-inst.cc
+++ b/libstdc++-v3/src/valarray.cc