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
This commit is contained in:
Benjamin Kosnik 2003-03-14 22:16:06 +00:00 committed by Benjamin Kosnik
parent 23345bbbcc
commit 628c731a48
7 changed files with 133 additions and 25 deletions

View 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

View 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

View 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,13 +457,19 @@ 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@
uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
@ -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 \

View File

@ -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>

View 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

View 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...

View File

@ -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