aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2003-03-14 22:16:06 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2003-03-14 22:16:06 +0000
commit628c731a48ab24519f13202bd912dc69bd8fb87e (patch)
treeacdd6c6813776c94011cfa1c90e57ba79d7fd8e6
parent23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6 (diff)
downloadgcc-628c731a48ab24519f13202bd912dc69bd8fb87e.zip
gcc-628c731a48ab24519f13202bd912dc69bd8fb87e.tar.gz
gcc-628c731a48ab24519f13202bd912dc69bd8fb87e.tar.bz2
stdc++.h: New.
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
-rw-r--r--libstdc++-v3/ChangeLog10
-rw-r--r--libstdc++-v3/include/Makefile.am21
-rw-r--r--libstdc++-v3/include/Makefile.in25
-rw-r--r--libstdc++-v3/include/stdc++.h82
-rw-r--r--libstdc++-v3/libsupc++/exception_defines.h7
-rw-r--r--libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp2
-rwxr-xr-xlibstdc++-v3/testsuite_flags.in11
7 files changed, 133 insertions, 25 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9c0fa21..6d77a24 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 4a62e04..01aa208 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -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
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index c00e373..78632db 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -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
index 0000000..d350a3c
--- /dev/null
+++ b/libstdc++-v3/include/stdc++.h
@@ -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>
diff --git a/libstdc++-v3/libsupc++/exception_defines.h b/libstdc++-v3/libsupc++/exception_defines.h
index fca2d83..1178f22 100644
--- a/libstdc++-v3/libsupc++/exception_defines.h
+++ b/libstdc++-v3/libsupc++/exception_defines.h
@@ -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
diff --git a/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp b/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp
index bad12dc..8b70564 100644
--- a/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp
+++ b/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp
@@ -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...
diff --git a/libstdc++-v3/testsuite_flags.in b/libstdc++-v3/testsuite_flags.in
index 4c35156..fb91119 100755
--- a/libstdc++-v3/testsuite_flags.in
+++ b/libstdc++-v3/testsuite_flags.in
@@ -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