From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30826 invoked by alias); 2 Apr 2003 17:40:59 -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 30819 invoked from network); 2 Apr 2003 17:40:59 -0000 Received: from unknown (HELO mail.libertysurf.net) (213.36.80.91) by sources.redhat.com with SMTP; 2 Apr 2003 17:40:59 -0000 Received: from localhost.localdomain (212.83.141.157) by mail.libertysurf.net (6.5.026) id 3E8A4CE7000203F0; Wed, 2 Apr 2003 19:40:58 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Eric Botcazou To: Geoff Keating Subject: PCH support on Solaris Date: Wed, 02 Apr 2003 18:33:00 -0000 User-Agent: KMail/1.4.3 Cc: gcc@gcc.gnu.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200304021934.12278.ebotcazou@libertysurf.fr> X-SW-Source: 2003-04/txt/msg00090.txt.bz2 Hi Geoff, PCH support doesn't currently work on Solaris because the mmap heuristics used in gt_pch_save and gt_pch_restore fails: poog% gcc/xgcc -Bgcc common-1.h mmi.preferred_base = ff220000 mmi.size = 56000 page_size = 2000 poog% rm common-1.h poog% gcc/xgcc -Bgcc common-1.c mmi.preferred_base = ff220000 mmi.size = 56000 mmi.offset = 6000 addr = ff226000 xgcc: Internal error: Segmentation Fault (program cc1) Please submit a full bug report. See for instructions. In other words, Solaris appears to map the whole file, whatever offset you specify in the call to mmap, so that the address returned is addr = mmi.preferred_base + mmi.offset The reporter of PR other/9830 proposes to force the address by passing MAP_FIXED to mmap; this works (all pch tests of the testsuite pass) but, if my interpretation is correct, this could fail if the pages before the forced address are for some reason unmappable. The other solution is of course to pre-calculate mmi.offset and add it to mmi.preferred_base, but there is an obvious chicken-and-egg problem with the current code in ggc-common.c. Hence two questions: which solution is the right one? If it is the second solution, is there any mean to easily pre-calculate mmi.offset or do we need to resort to re-playing the first part of the write operation? Thanks in advance. -- Eric Botcazou