From 6cbd871cb0dfadb1a91a68afefc7920674a81687 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Thu, 29 Jun 2006 21:24:57 +0000 Subject: [PATCH] Makefile.am (pch1_input, [...]): Move from pch_*. 2006-06-29 Benjamin Kosnik * include/Makefile.am (pch1_input, pch1_output_builddir, pch1_outputj_installdir, pch1_source): Move from pch_*. (pch2_input, pch2_output_builddir, pch2_output_installdir, pch2_source): Clone for ext. (pch3_input, pch3_output_builddir, pch3_output_installdir, pch3_source): Clone for tr1. (install-pch): Same. * include/Makefile.in: Regenerate. * include/precompiled: New directory. * include/stdc++.h: Move... * include/precompiled/stdc++.h: ... here. * include/precompiled/stdtr1c++.h: New. * include/precompiled/extc++.h: New. * testsuite/lib/libstdc++.exp (libstdc++_init): Set PCH_CXXFLAGS to -include bits/stdtr1c++.h. From-SVN: r115078 --- libstdc++-v3/ChangeLog | 20 ++++++++ libstdc++-v3/include/Makefile.am | 60 ++++++++++++++++++------ libstdc++-v3/include/Makefile.in | 54 ++++++++++++++++------ libstdc++-v3/include/precompiled/extc++.h | 61 +++++++++++++++++++++++++ libstdc++-v3/include/{ => precompiled}/stdc++.h | 0 libstdc++-v3/include/precompiled/stdtr1c++.h | 54 ++++++++++++++++++++++ libstdc++-v3/testsuite/lib/libstdc++.exp | 4 +- 7 files changed, 226 insertions(+), 27 deletions(-) create mode 100644 libstdc++-v3/include/precompiled/extc++.h rename libstdc++-v3/include/{ => precompiled}/stdc++.h (100%) create mode 100644 libstdc++-v3/include/precompiled/stdtr1c++.h diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0536648..67d3879 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,25 @@ 2006-06-29 Benjamin Kosnik + * include/Makefile.am (pch1_input, pch1_output_builddir, + pch1_outputj_installdir, pch1_source): Move from pch_*. + (pch2_input, pch2_output_builddir, + pch2_output_installdir, pch2_source): Clone for ext. + (pch3_input, pch3_output_builddir, + pch3_output_installdir, pch3_source): Clone for tr1. + (install-pch): Same. + * include/Makefile.in: Regenerate. + + * include/precompiled: New directory. + * include/stdc++.h: Move... + * include/precompiled/stdc++.h: ... here. + * include/precompiled/stdtr1c++.h: New. + * include/precompiled/extc++.h: New. + + * testsuite/lib/libstdc++.exp (libstdc++_init): Set PCH_CXXFLAGS + to -include bits/stdtr1c++.h. + +2006-06-29 Benjamin Kosnik + * testsuite/lib/libstdc++.exp (v3_target_compile): Set timeout to 600. diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 23a4120..dbaae32 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -763,10 +763,22 @@ thread_host_headers = \ ${host_builddir}/gthr-tpf.h \ ${host_builddir}/gthr-default.h -pch_input = ${host_builddir}/stdc++.h -pch_output_builddir = ${host_builddir}/stdc++.h.gch -pch_output_installdir = ${host_installdir}/stdc++.h.gch -pch_source = ${glibcxx_srcdir}/include/stdc++.h +pch1_input = ${host_builddir}/stdc++.h +pch1_output_builddir = ${host_builddir}/stdc++.h.gch +pch1_output_installdir = ${host_installdir}/stdc++.h.gch +pch1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h + +pch2_input = ${host_builddir}/stdtr1c++.h +pch2_output_builddir = ${host_builddir}/stdtr1c++.h.gch +pch2_output_installdir = ${host_installdir}/stdtr1c++.h.gch +pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h + +pch3_input = ${host_builddir}/extc++.h +pch3_output_builddir = ${host_builddir}/extc++.h.gch +pch3_output_installdir = ${host_installdir}/extc++.h.gch +pch3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h + +pch_input = ${pch1_input} ${pch2_input} ${pch3_input} PCHFLAGS=-Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS) if GLIBCXX_BUILD_PCH pch_build = ${pch_input} @@ -1026,13 +1038,32 @@ ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \ < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@ # Build a precompiled C++ include, stdc++.h.gch. -${pch_input}: ${allstamped} ${host_builddir}/c++config.h ${pch_source} - touch ${pch_input}; \ - if [ ! -d "${pch_output_builddir}" ]; then \ - mkdir -p ${pch_output_builddir}; \ +${pch1_input}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source} + touch ${pch1_input}; \ + if [ ! -d "${pch1_output_builddir}" ]; then \ + mkdir -p ${pch1_output_builddir}; \ + fi; \ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O0 -g -o ${pch1_output_builddir}/O0g.gch; \ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O2 -g -o ${pch1_output_builddir}/O2g.gch; + + +# Build a precompiled TR1 include, stdtr1c++.h.gch. +${pch2_input}: ${allstamped} ${host_builddir}/c++config.h ${pch2_source} ${pch1_input} + touch ${pch2_input}; \ + if [ ! -d "${pch2_output_builddir}" ]; then \ + mkdir -p ${pch2_output_builddir}; \ fi; \ - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g.gch; \ - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g.gch; + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch2_source} -O2 -g -o ${pch2_output_builddir}/O2g.gch; + + +# Build a precompiled extension include, extc++.h.gch. +${pch3_input}: ${allstamped} ${host_builddir}/c++config.h ${pch3_source} ${pch2_input} + touch ${pch3_input}; \ + if [ ! -d "${pch3_output_builddir}" ]; then \ + mkdir -p ${pch3_output_builddir}; \ + fi; \ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch3_source} -O2 -g -o ${pch3_output_builddir}/O2g.gch; + # For robustness sake (in light of junk files or in-source # configuration), copy from the build or source tree to the install @@ -1132,9 +1163,12 @@ install-headers: $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done install-pch: - $(mkinstalldirs) $(DESTDIR)${pch_output_installdir} - for file in ${pch_output_builddir}/*; do \ - $(INSTALL_DATA) $$file $(DESTDIR)${pch_output_installdir}; done + $(mkinstalldirs) $(DESTDIR)${pch1_output_installdir} + for file in ${pch1_output_builddir}/*; do \ + $(INSTALL_DATA) $$file $(DESTDIR)${pch1_output_installdir}; done + $(mkinstalldirs) $(DESTDIR)${pch2_output_installdir} + for file in ${pch2_output_builddir}/*; do \ + $(INSTALL_DATA) $$file $(DESTDIR)${pch2_output_installdir}; done # By adding these files here, automake will remove them for 'make clean' CLEANFILES = ${pch_input} ${pch_output_builddir}/* diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index d389b1d..184cc80 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -978,10 +978,19 @@ thread_host_headers = \ ${host_builddir}/gthr-tpf.h \ ${host_builddir}/gthr-default.h -pch_input = ${host_builddir}/stdc++.h -pch_output_builddir = ${host_builddir}/stdc++.h.gch -pch_output_installdir = ${host_installdir}/stdc++.h.gch -pch_source = ${glibcxx_srcdir}/include/stdc++.h +pch1_input = ${host_builddir}/stdc++.h +pch1_output_builddir = ${host_builddir}/stdc++.h.gch +pch1_output_installdir = ${host_installdir}/stdc++.h.gch +pch1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h +pch2_input = ${host_builddir}/stdtr1c++.h +pch2_output_builddir = ${host_builddir}/stdtr1c++.h.gch +pch2_output_installdir = ${host_installdir}/stdtr1c++.h.gch +pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h +pch3_input = ${host_builddir}/extc++.h +pch3_output_builddir = ${host_builddir}/extc++.h.gch +pch3_output_installdir = ${host_installdir}/extc++.h.gch +pch3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h +pch_input = ${pch1_input} ${pch2_input} ${pch3_input} PCHFLAGS = -Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS) @GLIBCXX_BUILD_PCH_FALSE@pch_build = @GLIBCXX_BUILD_PCH_TRUE@pch_build = ${pch_input} @@ -1401,13 +1410,29 @@ ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \ < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@ # Build a precompiled C++ include, stdc++.h.gch. -${pch_input}: ${allstamped} ${host_builddir}/c++config.h ${pch_source} - touch ${pch_input}; \ - if [ ! -d "${pch_output_builddir}" ]; then \ - mkdir -p ${pch_output_builddir}; \ +${pch1_input}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source} + touch ${pch1_input}; \ + if [ ! -d "${pch1_output_builddir}" ]; then \ + mkdir -p ${pch1_output_builddir}; \ fi; \ - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g.gch; \ - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g.gch; + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O0 -g -o ${pch1_output_builddir}/O0g.gch; \ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O2 -g -o ${pch1_output_builddir}/O2g.gch; + +# Build a precompiled TR1 include, stdtr1c++.h.gch. +${pch2_input}: ${allstamped} ${host_builddir}/c++config.h ${pch2_source} ${pch1_input} + touch ${pch2_input}; \ + if [ ! -d "${pch2_output_builddir}" ]; then \ + mkdir -p ${pch2_output_builddir}; \ + fi; \ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch2_source} -O2 -g -o ${pch2_output_builddir}/O2g.gch; + +# Build a precompiled extension include, extc++.h.gch. +${pch3_input}: ${allstamped} ${host_builddir}/c++config.h ${pch3_source} ${pch2_input} + touch ${pch3_input}; \ + if [ ! -d "${pch3_output_builddir}" ]; then \ + mkdir -p ${pch3_output_builddir}; \ + fi; \ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch3_source} -O2 -g -o ${pch3_output_builddir}/O2g.gch; # For robustness sake (in light of junk files or in-source # configuration), copy from the build or source tree to the install @@ -1504,9 +1529,12 @@ install-headers: $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done install-pch: - $(mkinstalldirs) $(DESTDIR)${pch_output_installdir} - for file in ${pch_output_builddir}/*; do \ - $(INSTALL_DATA) $$file $(DESTDIR)${pch_output_installdir}; done + $(mkinstalldirs) $(DESTDIR)${pch1_output_installdir} + for file in ${pch1_output_builddir}/*; do \ + $(INSTALL_DATA) $$file $(DESTDIR)${pch1_output_installdir}; done + $(mkinstalldirs) $(DESTDIR)${pch2_output_installdir} + for file in ${pch2_output_builddir}/*; do \ + $(INSTALL_DATA) $$file $(DESTDIR)${pch2_output_installdir}; done # 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/precompiled/extc++.h b/libstdc++-v3/include/precompiled/extc++.h new file mode 100644 index 0000000..2d71692 --- /dev/null +++ b/libstdc++-v3/include/precompiled/extc++.h @@ -0,0 +1,61 @@ +// C++ includes used for precompiling extensions -*- C++ -*- + +// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/libstdc++-v3/include/stdc++.h b/libstdc++-v3/include/precompiled/stdc++.h similarity index 100% rename from libstdc++-v3/include/stdc++.h rename to libstdc++-v3/include/precompiled/stdc++.h diff --git a/libstdc++-v3/include/precompiled/stdtr1c++.h b/libstdc++-v3/include/precompiled/stdtr1c++.h new file mode 100644 index 0000000..08822a0 --- /dev/null +++ b/libstdc++-v3/include/precompiled/stdtr1c++.h @@ -0,0 +1,54 @@ +// C++ includes used for precompiling TR1 -*- C++ -*- + +// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index b8c7215..64ce9d1 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -213,7 +213,9 @@ proc libstdc++_init { testfile } { set lines [v3_target_compile $src "config[pid].o" object \ "additional_flags=-include additional_flags=bits/stdc++.h"] if {$lines == "" } { - set PCH_CXXFLAGS "-include bits/stdc++.h" +# 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 "" } -- 2.7.4