diff mbox

[ARM] fix PR pch/45979 regression on ARM

Message ID BANLkTi=JozMFpMe5Ye-qRztsJx+d_h=mBw@mail.gmail.com
State New
Headers show

Commit Message

Michael Hope May 1, 2011, 9:21 p.m. UTC
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  <michael.hope@linaro.org>

	PR pch/45979
	* config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for
	__ARM_EABI__ hosts.

Comments

Richard Earnshaw May 3, 2011, 12:52 p.m. UTC | #1
On Mon, 2011-05-02 at 09:21 +1200, Michael Hope wrote:
> 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?
> 

OK.

R.

> -- Michael
> 
> gcc/
> 
> 2011-05-02  Michael Hope  <michael.hope@linaro.org>
> 
> 	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
Ramana Radhakrishnan May 5, 2011, 1:42 p.m. UTC | #2
>
> OK for trunk?

I have now committed this to trunk for you and will backport this to
release branches at some point in the next few days.

cheers
Ramana


>
> -- Michael
>
> gcc/
>
> 2011-05-02  Michael Hope  <michael.hope@linaro.org>
>
>        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
>
diff mbox

Patch

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