[committed] Darwin: Fix bootstrap break from libsanitizer changes

Message ID 7544E3D9-C5F5-49A9-AEE7-15BA5B9F463F@sandoe.co.uk
State New
Headers show
Series
  • [committed] Darwin: Fix bootstrap break from libsanitizer changes
Related show

Commit Message

Iain Sandoe May 1, 2020, 7:02 p.m.
Hi,

The recent libsanitizer change seems to have had a corrupt
chunk, that caused it to apply a change part way through the
SUBTARGET_INIT_BUILTINS macro, leading to a bootstrap fail
in stage1.

tested on x86_64-darwin16,
applied to master,
thanks
Iain

gcc/ChangeLog:

2020-05-01  Iain Sandoe  <iain@sandoe.co.uk>

	* config/i386/darwin.h: Repair SUBTARGET_INIT_BUILTINS.
	Override SUBTARGET_SHADOW_OFFSET macro.
---
 gcc/ChangeLog            | 5 +++++
 gcc/config/i386/darwin.h | 7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)

-- 
2.24.1

Comments

Andreas Tobler May 1, 2020, 7:52 p.m. | #1
On 01.05.20 21:02, Iain Sandoe wrote:
> Hi,

> 

> The recent libsanitizer change seems to have had a corrupt

> chunk, that caused it to apply a change part way through the

> SUBTARGET_INIT_BUILTINS macro, leading to a bootstrap fail

> in stage1.

> 

> tested on x86_64-darwin16,

> applied to master,


Sorry for the break and thank you for the quick fix.

Andreas

> gcc/ChangeLog:

> 

> 2020-05-01  Iain Sandoe  <iain@sandoe.co.uk>

> 

> 	* config/i386/darwin.h: Repair SUBTARGET_INIT_BUILTINS.

> 	Override SUBTARGET_SHADOW_OFFSET macro.

> ---

>   gcc/ChangeLog            | 5 +++++

>   gcc/config/i386/darwin.h | 7 +++----

>   2 files changed, 8 insertions(+), 4 deletions(-)

> 

> diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h

> index cff9a8c6b01..fec934aae69 100644

> --- a/gcc/config/i386/darwin.h

> +++ b/gcc/config/i386/darwin.h

> @@ -347,12 +347,11 @@ along with GCC; see the file COPYING3.  If not see

>   #define SUBTARGET_INIT_BUILTINS						\

>     do {									\

>       ix86_builtins[(int) IX86_BUILTIN_CFSTRING]				\

> +      = darwin_init_cfstring_builtins ((unsigned) (IX86_BUILTIN_CFSTRING)); \

> +    darwin_rename_builtins ();						\

> +  } while(0)

>   

>   /* Define the shadow offset for asan.  */

>   #undef SUBTARGET_SHADOW_OFFSET

>   #define SUBTARGET_SHADOW_OFFSET	\

>     (TARGET_LP64 ? HOST_WIDE_INT_1 << 44 : HOST_WIDE_INT_1 << 29)

> -

> -      = darwin_init_cfstring_builtins ((unsigned) (IX86_BUILTIN_CFSTRING)); \

> -    darwin_rename_builtins ();						\

> -  } while(0)

>

Patch

diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index cff9a8c6b01..fec934aae69 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -347,12 +347,11 @@  along with GCC; see the file COPYING3.  If not see
 #define SUBTARGET_INIT_BUILTINS						\
   do {									\
     ix86_builtins[(int) IX86_BUILTIN_CFSTRING]				\
+      = darwin_init_cfstring_builtins ((unsigned) (IX86_BUILTIN_CFSTRING)); \
+    darwin_rename_builtins ();						\
+  } while(0)
 
 /* Define the shadow offset for asan.  */
 #undef SUBTARGET_SHADOW_OFFSET
 #define SUBTARGET_SHADOW_OFFSET	\
   (TARGET_LP64 ? HOST_WIDE_INT_1 << 44 : HOST_WIDE_INT_1 << 29)
-
-      = darwin_init_cfstring_builtins ((unsigned) (IX86_BUILTIN_CFSTRING)); \
-    darwin_rename_builtins ();						\
-  } while(0)