Commit 628c731a by Benjamin Kosnik Committed by Benjamin Kosnik

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
parent 23345bbb
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> 2003-03-14 Loren J. Rittle <ljrittle@acm.org>
* testsuite/testsuite_hooks.h: Suppress runtime exception thrown by * testsuite/testsuite_hooks.h: Suppress runtime exception thrown by
......
...@@ -340,11 +340,15 @@ thread_target_headers = \ ...@@ -340,11 +340,15 @@ thread_target_headers = \
${target_builddir}/gthr-posix.h \ ${target_builddir}/gthr-posix.h \
${target_builddir}/gthr-default.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 # List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date. # CLEANFILES and all-local are kept up-to-date.
allstamps = \ allstamps = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \ 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 # Here are the rules for building the headers
all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps} all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
...@@ -363,12 +367,13 @@ stamp-std: ${std_headers} ...@@ -363,12 +367,13 @@ stamp-std: ${std_headers}
echo `date` > stamp-std ;\ echo `date` > stamp-std ;\
fi fi
stamp-std-precompile: stamp-std ${target_builddir}/c++config.h PCHFLAGS=-Winvalid-pch -x c++-header $(CXXFLAGS)
for h in ${std_headers_rename}; do \ stamp-stdc++-precompile: stamp-std ${target_builddir}/c++config.h ${pch_source}
echo "generating $$h.pch..."; \ if [ ! -f "${pch_output}" ]; then \
$(CXX) -Winvalid-pch -x c++-header $(INCLUDES) $${h}; \ $(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output}; \
done; \ touch ${pch_input}; \
echo `date` > stamp-std-precompile fi; \
touch stamp-stdc++-precompile
stamp-bits: ${bits_headers} stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \ @if [ ! -d "${bits_builddir}" ]; then \
...@@ -525,7 +530,7 @@ install-data-local: ...@@ -525,7 +530,7 @@ install-data-local:
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done
# By adding these files here, automake will remove them for 'make clean' # 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 # Stop implicit '.o' make rules from ever stomping on extensionless
# headers, in the improbable case where some foolish, crack-addled # headers, in the improbable case where some foolish, crack-addled
......
# 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. # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
...@@ -457,12 +457,18 @@ thread_target_headers = \ ...@@ -457,12 +457,18 @@ thread_target_headers = \
${target_builddir}/gthr-default.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 # List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date. # CLEANFILES and all-local are kept up-to-date.
allstamps = \ allstamps = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \ 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 # Target includes for threads
glibcpp_thread_h = @glibcpp_thread_h@ glibcpp_thread_h = @glibcpp_thread_h@
...@@ -479,7 +485,7 @@ uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_] ...@@ -479,7 +485,7 @@ uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
gxx_include_dir = @gxx_include_dir@ gxx_include_dir = @gxx_include_dir@
# By adding these files here, automake will remove them for 'make clean' # 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_HEADER = ../config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in DIST_COMMON = Makefile.am Makefile.in
...@@ -599,13 +605,12 @@ stamp-std: ${std_headers} ...@@ -599,13 +605,12 @@ stamp-std: ${std_headers}
done) ;\ done) ;\
echo `date` > stamp-std ;\ echo `date` > stamp-std ;\
fi fi
stamp-stdc++-precompile: stamp-std ${target_builddir}/c++config.h ${pch_source}
stamp-std-precompile: stamp-std ${target_builddir}/c++config.h if [ ! -f "${pch_output}" ]; then \
for h in ${std_headers_rename}; do \ $(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output}; \
echo "generating $$h.pch..."; \ touch ${pch_input}; \
$(CXX) -Winvalid-pch -x c++-header $(INCLUDES) $${h}; \ fi; \
done; \ touch stamp-stdc++-precompile
echo `date` > stamp-std-precompile
stamp-bits: ${bits_headers} stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \ @if [ ! -d "${bits_builddir}" ]; then \
......
// 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>
// -fno-exceptions Support -*- C++ -*- // -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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
// ISO C++ 14882: 19.1 Exception classes // ISO C++ 14882: 19.1 Exception classes
// //
#ifndef __EXCEPTION_DEFINES_H
#define __EXCEPTION_DEFINES_H 1
#ifndef __EXCEPTIONS #ifndef __EXCEPTIONS
// Iff -fno-exceptions, transform error handling code to work without it. // Iff -fno-exceptions, transform error handling code to work without it.
# define try if (true) # define try if (true)
...@@ -40,3 +43,5 @@ ...@@ -40,3 +43,5 @@
// Else proceed normally. // Else proceed normally.
# define __throw_exception_again throw # define __throw_exception_again throw
#endif #endif
#endif
...@@ -22,7 +22,7 @@ load_lib libstdc++-v3-dg.exp ...@@ -22,7 +22,7 @@ load_lib libstdc++-v3-dg.exp
# If a testcase doesn't have special options, use these. # If a testcase doesn't have special options, use these.
global DEFAULT_CXXFLAGS global DEFAULT_CXXFLAGS
if ![info exists DEFAULT_CXXFLAGS] then { 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... # Initialize 'dg' last or dejagnu exits with an error...
......
...@@ -43,15 +43,16 @@ case ${query} in ...@@ -43,15 +43,16 @@ case ${query} in
echo ${CXX} echo ${CXX}
;; ;;
--build-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'` CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
echo ${CXX} echo ${CXX}
;; ;;
--cxxflags) --cxxflags)
CXXFLAGS=' -g @SECTION_FLAGS@ @SECTION_LDFLAGS@ CXXFLAGS_save="-g -O2"
-fmessage-length=0 @EXTRA_CXX_FLAGS@ CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0
-DDEBUG_ASSERT -DLOCALEDIR="@glibcpp_localedir@" ' @EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcpp_localedir@" '
echo ${CXXFLAGS} echo ${CXXFLAGS_save} ${CXXFLAGS_config}
;; ;;
*) *)
print_usage print_usage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment