From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29533 invoked by alias); 24 Feb 2003 13:36:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 29513 invoked by uid 71); 24 Feb 2003 13:36:00 -0000 Resent-Date: 24 Feb 2003 13:36:00 -0000 Resent-Message-ID: <20030224133600.29512.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, mteske@csksoftware.com Received: (qmail 26863 invoked by uid 48); 24 Feb 2003 13:26:12 -0000 Message-Id: <20030224132612.26862.qmail@sources.redhat.com> Date: Mon, 24 Feb 2003 13:36:00 -0000 From: mteske@csksoftware.com Reply-To: mteske@csksoftware.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: other/9830: [pch] not working on Solaris 9 X-SW-Source: 2003-02/txt/msg01240.txt.bz2 List-Id: >Number: 9830 >Category: other >Synopsis: [pch] not working on Solaris 9 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Feb 24 13:36:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Michael Teske >Release: gcc version 3.4 20030222 (experimental) >Organization: >Environment: Solaris 9 >Description: Under SOlaris 9, when trying to use any precompiled header, gcc/g++ bails out with a "had to relocate PCH"-error message. This is because in the mmap-call in gt_pch_restore(), the MAP_FIXED falg is missing, causing Solaris to return a different address from the specified one. >How-To-Repeat: Try to include a file whre a .pch-file exists, too. >Fix: Use this patch. One might have to check for solaris, though, since I don't know if MAP_FIXED is a generic mmap option. *** ggc-common.c-orig Mon Feb 24 11:47:34 2003 --- ggc-common.c Mon Feb 24 14:23:31 2003 *************** *** 583,589 **** #if HAVE_MMAP_FILE addr = mmap (mmi.preferred_base, mmi.size, ! PROT_READ | PROT_WRITE, MAP_PRIVATE, fileno (f), mmi.offset); #else addr = (void *)-1; --- 583,589 ---- #if HAVE_MMAP_FILE addr = mmap (mmi.preferred_base, mmi.size, ! PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED , fileno (f), mmi.offset); #else addr = (void *)-1; >Release-Note: >Audit-Trail: >Unformatted: