[pushed] Darwin: Adjust the PCH area to allow for 16384byte page size.

Message ID 3ED4CD3E-6905-41ED-9EC5-8922E63C96FA@sandoe.co.uk
State New
Headers show
Series
  • [pushed] Darwin: Adjust the PCH area to allow for 16384byte page size.
Related show

Commit Message

Iain Sandoe Nov. 1, 2020, 8:38 p.m.
Hi

The new version of Darwin report pagesize 16384 which means that we
need to adjust the aligment of the PCH area.

tested across the Darwin range (32 and 64 bit hosts) and on x86_64-linux-gnu
pushed to master
thanks
Iain

gcc/ChangeLog:

	* config/host-darwin.c: Align pch_address_space to 16384.
---
 gcc/config/host-darwin.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.24.1

Patch

diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
index 0face6c450f..c862935dcf3 100644
--- a/gcc/config/host-darwin.c
+++ b/gcc/config/host-darwin.c
@@ -24,7 +24,10 @@ 
 #include "config/host-darwin.h"
 
 /* Yes, this is really supposed to work.  */
-static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
+/* This allows for a pagesize of 16384, which we have on Darwin20, but should
+   continue to work OK for pagesize 4096 which we have on earlier versions.
+   The size is 1 (binary) Gb.  */
+static char pch_address_space[65536*16384] __attribute__((aligned (16384)));
 
 /* Return the address of the PCH address space, if the PCH will fit in it.  */