From: Philippe E. <ph...@us...> - 2003-09-06 16:59:36
|
Update of /cvsroot/oprofile/oprofile In directory sc8-pr-cvs1:/tmp/cvs-serv10324 Modified Files: .cvsignore ChangeLog Makefile.am TODO configure.in Added Files: pch-c++.h Log Message: build stuff: add --enable-pch (off by default) which enable precompiled header if compiler support it. --- NEW FILE: pch-c++.h --- // stolen from stdc++.h. FIXME: currently -include stdc++.h is broken // when it'll work we can remove this file from cvs. // 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: .cvsignore =================================================================== RCS file: /cvsroot/oprofile/oprofile/.cvsignore,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -d -r1.14 -r1.15 --- .cvsignore 31 May 2003 16:06:42 -0000 1.14 +++ .cvsignore 6 Sep 2003 16:59:32 -0000 1.15 @@ -24,3 +24,4 @@ config.h.in config.h tags autom4te.cache +pch-c++.h.gch Index: ChangeLog =================================================================== RCS file: /cvsroot/oprofile/oprofile/ChangeLog,v retrieving revision 1.1177 retrieving revision 1.1178 diff -u -p -d -r1.1177 -r1.1178 --- ChangeLog 5 Sep 2003 16:57:51 -0000 1.1177 +++ ChangeLog 6 Sep 2003 16:59:32 -0000 1.1178 @@ -1,3 +1,11 @@ +2003-09-06 Philippe Elie <ph...@wa...> + + * pch-c++.h: + * m4/precompiledheader.m4: new file to handle precompiled header + * m4/Makefile.am: + * configure.in: + * Makefile.am: handle precompiled header + 2003-09-05 John Levon <le...@mo...> * opd_image.c: cleanup of ctx_switch_set_image() Index: Makefile.am =================================================================== RCS file: /cvsroot/oprofile/oprofile/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -d -r1.14 -r1.15 --- Makefile.am 31 May 2003 16:06:43 -0000 1.14 +++ Makefile.am 6 Sep 2003 16:59:32 -0000 1.15 @@ -1,4 +1,5 @@ SUBDIRS = \ + . \ m4 \ libutil \ libop \ @@ -21,7 +22,15 @@ ACLOCAL_AMFLAGS = -I m4 # The module will not build under distcheck DISTCHECK_CONFIGURE_FLAGS = --with-kernel-support -all-local: kernel_module +if enable_pch +CXXFLAGS=-O2 -g +pch-c++.h.gch: pch-c++.h + $(CXX) $(CXXFLAGS) pch-c++.h +else +pch-c++.h.gch: +endif + +all-local: kernel_module pch-c++.h.gch install-exec-local: install.kernel if kernel_support @@ -42,7 +51,7 @@ install.kernel: kernel_module endif clean-local: - rm -f module/*.o module/@OPROFILE_MODULE_ARCH@/*.o \ + rm -f pch-c++.h.gch module/*.o module/@OPROFILE_MODULE_ARCH@/*.o \ module/.*.o.cmd module/.*.o.flags \ module/@OPROFILE_MODULE_ARCH@/.*.o.cmd module/@OPROFILE_MODULE_ARCH@/.*.o.flags @@ -50,6 +59,7 @@ EXTRA_DIST = \ ChangeLog-2001 \ ChangeLog-2002 \ autogen.sh \ + pch-c++.h \ include/sstream \ module/Makefile.in \ module/compat.c \ Index: TODO =================================================================== RCS file: /cvsroot/oprofile/oprofile/TODO,v retrieving revision 1.262 retrieving revision 1.263 diff -u -p -d -r1.262 -r1.263 --- TODO 4 Sep 2003 14:48:59 -0000 1.262 +++ TODO 6 Sep 2003 16:59:32 -0000 1.263 @@ -93,6 +93,8 @@ General checks to make o test it to hell and back o compile all C++ programs with STL_port and test them o There is probably place of post profile tools where looking at errno will give better error messages. + o gcc-cvs -include stdc++ doesn't use precompiled header, when it'll work + we can remove pch-c++.h from cvs Later ----- Index: configure.in =================================================================== RCS file: /cvsroot/oprofile/oprofile/configure.in,v retrieving revision 1.176 retrieving revision 1.177 diff -u -p -d -r1.176 -r1.177 --- configure.in 25 Aug 2003 09:22:46 -0000 1.176 +++ configure.in 6 Sep 2003 16:59:32 -0000 1.177 @@ -98,6 +98,15 @@ if test "$enable_abi" = yes; then fi AM_CONDITIONAL(enable_abi, test "$enable_abi" = yes) +dnl enable pch for c++ +AC_ARG_ENABLE(pch, + [ --enable-pch enable precompiled header (default is disabled)], + enable_pch=$enableval, enable_pch=no) +if test "$enable_pch" = yes; then + AX_CHECK_PRECOMPILED_HEADER(OP_CXXFLAGS, enable_pch) +fi +AM_CONDITIONAL(enable_pch, test "$enable_pch" = yes) + AX_CHECK_DOCBOOK dnl finally restore the original libs setting |