From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17285 invoked by alias); 15 Apr 2003 18:41:13 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 17268 invoked from network); 15 Apr 2003 18:41:12 -0000 Received: from unknown (HELO desire.geoffk.org) (12.235.88.42) by sources.redhat.com with SMTP; 15 Apr 2003 18:41:12 -0000 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id h3FIdb908930; Tue, 15 Apr 2003 11:39:37 -0700 Date: Tue, 15 Apr 2003 20:39:00 -0000 From: Geoff Keating Message-Id: <200304151839.h3FIdb908930@desire.geoffk.org> To: bkoz@redhat.com CC: libstdc++@gcc.gnu.org, gcc@gcc.gnu.org, law@redhat.com In-reply-to: <20030415122353.64376cda.bkoz@redhat.com> (message from Benjamin Kosnik on Tue, 15 Apr 2003 12:23:53 -0500) Subject: Re: using stdc++.h.gch References: <20030415122353.64376cda.bkoz@redhat.com> X-SW-Source: 2003-04/txt/msg00721.txt.bz2 > Date: Tue, 15 Apr 2003 12:23:53 -0500 > From: Benjamin Kosnik > Cc: law@redhat.com, geoffk@geoffk.org > X-OriginalArrivalTime: 15 Apr 2003 17:25:23.0129 (UTC) FILETIME=[FF073290:01C30373] > > > Geoff recently fixed the last issue with PCH support on linux. It is now > possible to use pre compiled headers on linux. Doing so is a win, by > quite a large margin. > > for 'time make check-target-libstdc++-v3' > > 20030415 pch > 722.110u 89.320s 19:26.08 69.5% 0+0k 0+0io 5429730pf+0w > > 20030415 no pch > 1514.670u 108.510s 34:27.58 78.5% 0+0k 0+0io 2496245pf+0w > > I expect similar results for the g++ testsuite. > > I'm all about reclaiming 15 more minutes in my day (times x times I do > make check) by using the precompiled header support. Also, if this is > flipped on, more people will use PCH and thus it will get wider testing. > > Attached is a patch that enables PCH by default, for all targets. I'd > appreciate it if people could start testing with this patch and let me > know the results. In particular, I'm curious about 64 bit linux systems, > BSD, and Solaris. Solaris is known to not-work, due to some weirdness in their mmap() implementation. I think the current situation is that there are two possible design choices, one that is more portable but maybe slower, and another that relies on fragile OS behaviour but would be fast when it worked. BSD is known to work (well, Darwin at least). > Also, I have some questions and issues. > > 1) What targets support PCH, and how can I identify this in autoconf? > I'm assuming that PCH should not be flipped on for everybody, and that > maybe an --enable flag will be needed, with hosts that support it > getting it automagically fipped on? If you did want to check PCH support with autoconf, I'd suggest trying to build a PCH file and trying to use it. > 2) At some point, -H needs to show that the .gch files is being used. > What this means is still a bit up in the air. > > 3) Installing a zero-size stdc++.h file so that I can use stdc++.h.gch > seems weird. Is it possible to just do some kind of -include > /foo/stdc++.gch? You don't need to have a stdc++.h file to use stdc++.h.gch; and -include does work, although remember that you have to leave the .gch off. -- - Geoffrey Keating