stdc++.h: New.
authorBenjamin Kosnik <bkoz@redhat.com>
Fri, 14 Mar 2003 22:16:06 +0000 (22:16 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Fri, 14 Mar 2003 22:16:06 +0000 (22:16 +0000)
2003-03-14  Benjamin Kosnik  <bkoz@redhat.com>

* include/stdc++.h: New.
* libsupc++/exception_defines.h (__EXCEPTION_DEFINES_H): Add guard.
* include/Makefile.am (stamp-std-precompile): Generate stdc++.h.gch
        * include/Makefile.in: Regenerate.
        * testsuite_flags.in (--build-cxx): Add, but don't use PCHFLAGS.
(--cxxflags): Put -g -O2 here.
* testsuite/libstdc++-v3.dg/dg.exp: Remove -g -O2 here.

From-SVN: r64374

libstdc++-v3/ChangeLog
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/stdc++.h [new file with mode: 0644]
libstdc++-v3/libsupc++/exception_defines.h
libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp
libstdc++-v3/testsuite_flags.in

index 9c0fa212917941e0c5b51771188b101dce15d419..6d77a248038c8d797855efe08099f78111539119 100644 (file)
@@ -1,3 +1,13 @@
+2003-03-14  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/stdc++.h: New.        
+       * libsupc++/exception_defines.h (__EXCEPTION_DEFINES_H): Add guard.
+       * include/Makefile.am (stamp-std-precompile): Generate stdc++.h.gch
+        * include/Makefile.in: Regenerate.
+        * testsuite_flags.in (--build-cxx): Add, but don't use PCHFLAGS.
+       (--cxxflags): Put -g -O2 here.
+       * testsuite/libstdc++-v3.dg/dg.exp: Remove -g -O2 here.
+
 2003-03-14  Loren J. Rittle  <ljrittle@acm.org>
 
        * testsuite/testsuite_hooks.h: Suppress runtime exception thrown by
index 4a62e04eae6ea34599c92e53862a3f9ce5e64cd6..01aa208bfbbda1e8771d670816db91c318eca685 100644 (file)
@@ -340,11 +340,15 @@ thread_target_headers = \
        ${target_builddir}/gthr-posix.h \
        ${target_builddir}/gthr-default.h
 
+pch_input = stdc++.h
+pch_output = stdc++.h.gch
+pch_source = ${glibcpp_srcdir}/include/${pch_input}
+
 # List of all timestamp files.  By keeping only one copy of this list, both
 # CLEANFILES and all-local are kept up-to-date.
 allstamps = \
        stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
-       stamp-backward stamp-ext stamp-target 
+       stamp-backward stamp-ext stamp-target
 
 # Here are the rules for building the headers
 all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
@@ -363,12 +367,13 @@ stamp-std: ${std_headers}
          echo `date` > stamp-std ;\
        fi
 
-stamp-std-precompile: stamp-std ${target_builddir}/c++config.h
-       for h in ${std_headers_rename}; do \
-         echo "generating $$h.pch..."; \
-         $(CXX) -Winvalid-pch -x c++-header $(INCLUDES) $${h}; \
-       done; \
-       echo `date` > stamp-std-precompile
+PCHFLAGS=-Winvalid-pch -x c++-header $(CXXFLAGS)
+stamp-stdc++-precompile: stamp-std ${target_builddir}/c++config.h ${pch_source}
+       if [ ! -f "${pch_output}" ]; then \
+         $(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output}; \
+         touch ${pch_input}; \
+       fi; \
+       touch stamp-stdc++-precompile
 
 stamp-bits: ${bits_headers}
        @if [ ! -d "${bits_builddir}" ]; then \
@@ -525,7 +530,7 @@ install-data-local:
          $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done
 
 # By adding these files here, automake will remove them for 'make clean'
-CLEANFILES = *.pch stamp-std-precompile
+CLEANFILES = *.gch stamp-stdc++-precompile
 
 # Stop implicit '.o' make rules from ever stomping on extensionless
 # headers, in the improbable case where some foolish, crack-addled
index c00e373d3bc0dac703e8906f9a3f4a09811f9435..78632dbe74d117a9553256ccbd7ef04fd81f74c3 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -457,12 +457,18 @@ thread_target_headers = \
        ${target_builddir}/gthr-default.h
 
 
+pch_input = stdc++.h
+pch_output = stdc++.h.gch
+pch_source = ${glibcpp_srcdir}/include/${pch_input}
+
 # List of all timestamp files.  By keeping only one copy of this list, both
 # CLEANFILES and all-local are kept up-to-date.
 allstamps = \
        stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
-       stamp-backward stamp-ext stamp-target 
+       stamp-backward stamp-ext stamp-target
+
 
+PCHFLAGS = -Winvalid-pch -x c++-header $(CXXFLAGS)
 
 # Target includes for threads
 glibcpp_thread_h = @glibcpp_thread_h@
@@ -479,7 +485,7 @@ uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
 gxx_include_dir = @gxx_include_dir@
 
 # By adding these files here, automake will remove them for 'make clean'
-CLEANFILES = *.pch stamp-std-precompile
+CLEANFILES = *.gch stamp-stdc++-precompile
 CONFIG_HEADER = ../config.h
 CONFIG_CLEAN_FILES = 
 DIST_COMMON =  Makefile.am Makefile.in
@@ -599,13 +605,12 @@ stamp-std: ${std_headers}
          done) ;\
          echo `date` > stamp-std ;\
        fi
-
-stamp-std-precompile: stamp-std ${target_builddir}/c++config.h
-       for h in ${std_headers_rename}; do \
-         echo "generating $$h.pch..."; \
-         $(CXX) -Winvalid-pch -x c++-header $(INCLUDES) $${h}; \
-       done; \
-       echo `date` > stamp-std-precompile
+stamp-stdc++-precompile: stamp-std ${target_builddir}/c++config.h ${pch_source}
+       if [ ! -f "${pch_output}" ]; then \
+         $(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output}; \
+         touch ${pch_input}; \
+       fi; \
+       touch stamp-stdc++-precompile
 
 stamp-bits: ${bits_headers}
        @if [ ! -d "${bits_builddir}" ]; then \
diff --git a/libstdc++-v3/include/stdc++.h b/libstdc++-v3/include/stdc++.h
new file mode 100644 (file)
index 0000000..d350a3c
--- /dev/null
@@ -0,0 +1,82 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003 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 2, 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.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// 17.4.1.2 Headers
+
+// C
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
index fca2d835f4102e5a1e1a176d3658045978dfd06e..1178f22452790cca772938d56723a272ca82698c 100644 (file)
@@ -1,6 +1,6 @@
 // -fno-exceptions Support -*- C++ -*-
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -31,6 +31,9 @@
 // ISO C++ 14882: 19.1  Exception classes
 //
 
+#ifndef __EXCEPTION_DEFINES_H
+#define __EXCEPTION_DEFINES_H 1
+
 #ifndef __EXCEPTIONS
 // Iff -fno-exceptions, transform error handling code to work without it.
 # define try      if (true)
@@ -40,3 +43,5 @@
 // Else proceed normally.
 # define __throw_exception_again throw
 #endif
+
+#endif
index bad12dc31dc004d9547fdde88049c7293e5cc648..8b70564d87a09f5e1d2be91bf488d8412353afea 100644 (file)
@@ -22,7 +22,7 @@ load_lib libstdc++-v3-dg.exp
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CXXFLAGS
 if ![info exists DEFAULT_CXXFLAGS] then {
-    set DEFAULT_CXXFLAGS "-g -O2 -DDEBUG_ASSERT"
+    set DEFAULT_CXXFLAGS "-DDEBUG_ASSERT"
 }
 
 # Initialize 'dg' last or dejagnu exits with an error...
index 4c351569a37c5049479f988d5ef25492e3b4ef7c..fb911193a0e4e26d100b9c2e8aea82860b3478be 100755 (executable)
@@ -43,15 +43,16 @@ case ${query} in
       echo ${CXX}
       ;;
     --build-cxx)
-      CC_build="@glibcpp_CXX@"
+      PCHFLAGS="-Winvalid-pch -include ${BUILD_DIR}/include/stdc++.h"
+      CC_build="@glibcpp_CXX@
       CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
       echo ${CXX}
       ;;
     --cxxflags)
-      CXXFLAGS=' -g @SECTION_FLAGS@ @SECTION_LDFLAGS@
-                -fmessage-length=0 @EXTRA_CXX_FLAGS@
-                -DDEBUG_ASSERT  -DLOCALEDIR="@glibcpp_localedir@" '
-      echo ${CXXFLAGS}
+      CXXFLAGS_save="-g -O2"
+      CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0 
+                     @EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcpp_localedir@" '
+      echo ${CXXFLAGS_save} ${CXXFLAGS_config}
       ;;
     *)
       print_usage