public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [v3] --disable-libstdcxx-pch fixes
@ 2007-10-06  3:11 Benjamin Kosnik
  0 siblings, 0 replies; only message in thread
From: Benjamin Kosnik @ 2007-10-06  3:11 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

This allows --disable-libstdcxx-pch to run the libstdc++ testsuite
without a PCH file (or stdc++.h file).

In so doing, I fixed up a couple of bits where the current include
behavior is wrong.

This is all pretty straightforward except for the std::remove bit.

tested x86/linux

-benjamin

[-- Attachment #2: p.20071005-1 --]
[-- Type: application/octet-stream, Size: 30789 bytes --]

2007-10-05  Benjamin Kosnik  <bkoz@redhat.com>

	Fixes for --disable-libstdcxx-pch.
	* include/ext/rc_string_base.h: Include stl_iterator_base_funcs.h.
	* include/ext/vstring_util.h: Include stl_iterator.h and
	numeric_traits.h.
	* include/tr1/functional: Include new.
	* testsuite/util/testsuite_api.h: Include exception.
	* testsuite/lib/libstdc++.exp (libstdc++_init): Set
	PCH_CXXFLAGS via cxxpchflags.

	* testsuite/25_algorithms/binary_search/requirements/
	explicit_instantiation/2.cc: Same.: Fix includes.
	* testsuite/25_algorithms/count_if/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/equal_range/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/find_end/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/find_first_of/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/find_if/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/for_each/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/includes/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/inplace_merge/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/lexicographical_compare/
	requirements/explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/lower_bound/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/make_heap/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/max_element/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/max/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/merge/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/min_element/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/min/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/next_permutation/
	requirements/explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/nth_element/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/partial_sort_copy/
	requirements/explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/partial_sort/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/partition/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/pop_heap/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/prev_permutation/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/push_heap/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/random_shuffle/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/remove_copy_if/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/remove_if/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/replace_copy_if/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/replace_if/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/search_n/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/search/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/set_difference/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/set_intersection/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/set_symmetric_difference/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/set_union/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/sort_heap/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/sort/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/stable_partition/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/stable_sort/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/transform/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/unique_copy/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/unique/requirements/
	explicit_instantiation/2.cc: Same.
	* testsuite/25_algorithms/upper_bound/requirements/
	explicit_instantiation/2.cc: Same.

	* testsuite/25_algorithms/remove/requirements/
	explicit_instantiation/pod.cc: Provide a hint to the compiler.

Index: include/ext/vstring_util.h
===================================================================
--- include/ext/vstring_util.h	(revision 129048)
+++ include/ext/vstring_util.h	(working copy)
@@ -44,6 +44,8 @@
 #include <bits/functexcept.h>
 #include <bits/localefwd.h>
 #include <bits/ostream_insert.h>
+#include <bits/stl_iterator.h>
+#include <ext/numeric_traits.h>
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
Index: include/ext/rc_string_base.h
===================================================================
--- include/ext/rc_string_base.h	(revision 129048)
+++ include/ext/rc_string_base.h	(working copy)
@@ -37,6 +37,7 @@
 #define _RC_STRING_BASE_H 1
 
 #include <ext/atomicity.h>
+#include <bits/stl_iterator_base_funcs.h>
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
Index: include/tr1/functional
===================================================================
--- include/tr1/functional	(revision 129048)
+++ include/tr1/functional	(working copy)
@@ -45,6 +45,7 @@
 
 #include <cmath>
 #include <typeinfo>
+#include <new>
 #include <tr1/tuple>
 #include <tr1/type_traits>
 #include <bits/stringfwd.h>

Index: testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc
===================================================================
--- testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc	(revision 129048)
+++ testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc	(working copy)
@@ -39,6 +39,5 @@
   typedef pod_int 		value_type;
   typedef value_type* 		iterator_type;
 
-  template iterator_type remove(iterator_type, iterator_type, 
-				const value_type&);
+  template iterator_type remove<iterator_type, value_type>(iterator_type, iterator_type, const value_type&);
 } 
Index: testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc	(working copy)
@@ -31,6 +31,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc	(working copy)
@@ -31,6 +31,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc	(working copy)
@@ -31,6 +31,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc	(revision 129048)
+++ testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc	(working copy)
@@ -30,6 +30,7 @@
 // the GNU General Public License.
 
 #include <algorithm>
+#include <functional>
 #include <testsuite_api.h>
 
 namespace std
Index: testsuite/lib/libstdc++.exp
===================================================================
--- testsuite/lib/libstdc++.exp	(revision 129048)
+++ testsuite/lib/libstdc++.exp	(working copy)
@@ -83,7 +83,7 @@
     global env
     global v3-sharedlib 
     global srcdir blddir objdir tool_root_dir
-    global cc cxx cxxflags cxxldflags
+    global cc cxx cxxflags cxxpchflags cxxldflags
     global includes
     global gluefile wrap_flags
     global ld_library_path
@@ -184,6 +184,7 @@
     # Default settings.
     set cxx [transform "g++"]
     set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
+    set cxxpchflags ""
     set cxxldflags ""
     set cc [transform "gcc"]
     # Locate testsuite_hooks.h and other testsuite headers.
@@ -221,6 +222,7 @@
         # If we find a testsuite_flags file, we're testing in the build dir.
 	set cxx [exec sh $flags_file --build-cxx]
 	set cxxflags [exec sh $flags_file --cxxflags]
+	set cxxpchflags [exec sh $flags_file --cxxpchflags]
 	set cxxldflags [exec sh $flags_file --cxxldflags]
 	set cc [exec sh $flags_file --build-cc]
 	set includes [exec sh $flags_file --build-includes]
@@ -237,23 +239,29 @@
     # this check until $cxx and such have been initialized because we
     # perform a test compilation.  (Ideally, gcc --print-file-name would
     # list PCH files, but it does not.)
-    global PCH_CXXFLAGS
-    if ![info exists PCH_CXXFLAGS] then {
+    if { $cxxpchflags != "" } {
 	set src "config[pid].cc"
 	set f [open $src "w"]
 	puts $f "int main () {}"
 	close $f
 
+	# Fixme: "additional_flags=$cxxpchflags" fails, but would be
+	# useful as then the requested variant of the pre-build PCH
+	# files could be tested to see if it works.
 	set lines [v3_target_compile $src "config[pid].o" object \
-	         "additional_flags=-include additional_flags=bits/stdtr1c++.h"]
-	if {$lines == "" } {
-#	    set PCH_CXXFLAGS "-include bits/extc++.h"
-#	    set PCH_CXXFLAGS "-include bits/stdtr1c++.h"
-	    set PCH_CXXFLAGS "-include bits/stdc++.h"
-	} else {
-	    set PCH_CXXFLAGS ""
-	}
+		   "additional_flags=-include additional_flags=bits/stdc++.h"]
+	if { $lines != "" } {
+	    verbose -log "Requested PCH file: $cxxpchflags"
+	    verbose -log "is not working, and will not be used."
+	    set cxxpchflags ""
+	} 
 	file delete $src
+     } 
+    v3track cxxpchflags 2
+
+    global PCH_CXXFLAGS
+    if ![info exists PCH_CXXFLAGS] then {
+	set PCH_CXXFLAGS $cxxpchflags
 	v3track PCH_CXXFLAGS 2
     }
 
Index: testsuite/util/testsuite_api.h
===================================================================
--- testsuite/util/testsuite_api.h	(revision 129048)
+++ testsuite/util/testsuite_api.h	(working copy)
@@ -28,6 +28,7 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
+#include <exception>
 #include <testsuite_hooks.h>
 
 #ifndef _TESTSUITE_API

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-06  3:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-06  3:11 [v3] --disable-libstdcxx-pch fixes Benjamin Kosnik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).