From patchwork Sun May 1 21:21:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Hope X-Patchwork-Id: 93584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9D6901007D1 for ; Mon, 2 May 2011 07:22:25 +1000 (EST) Received: (qmail 15551 invoked by alias); 1 May 2011 21:22:24 -0000 Received: (qmail 15541 invoked by uid 22791); 1 May 2011 21:22:23 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-bw0-f47.google.com (HELO mail-bw0-f47.google.com) (209.85.214.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 01 May 2011 21:22:01 +0000 Received: by bwz5 with SMTP id 5so5233533bwz.20 for ; Sun, 01 May 2011 14:22:00 -0700 (PDT) Received: by 10.204.20.132 with SMTP id f4mr2758291bkb.169.1304284918165; Sun, 01 May 2011 14:21:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.22.2 with HTTP; Sun, 1 May 2011 14:21:38 -0700 (PDT) From: Michael Hope Date: Mon, 2 May 2011 09:21:38 +1200 Message-ID: Subject: [PATCH, ARM] fix PR pch/45979 regression on ARM To: gcc-patches@gcc.gnu.org Cc: patches@linaro.org X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Linux 2.6.35 and later on ARM randomise the address space, breaking precompiled header support in GCC. The fix is to use the support in GCC for mmap()ing into a fixed, likely to be free address. The ARM memory map is modeled on the i386 so I used the same definition. Tested on trunk with a Ubuntu 2.6.35 kernel. Bootstraps OK and clears all of the PCH testsuite failures. Note that this change is equivalent to Mikael Pettersson's patch at: http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02252.html OK for trunk? -- Michael gcc/ 2011-05-02 Michael Hope PR pch/45979 * config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for __ARM_EABI__ hosts. diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c index 47ce3ea..8b41685 100644 --- a/gcc/config/host-linux.c +++ b/gcc/config/host-linux.c @@ -84,6 +84,8 @@ # define TRY_EMPTY_VM_SPACE 0x60000000 #elif defined(__mc68000__) # define TRY_EMPTY_VM_SPACE 0x40000000 +#elif defined(__ARM_EABI__) +# define TRY_EMPTY_VM_SPACE 0x60000000 #else # define TRY_EMPTY_VM_SPACE 0 #endif