public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] Darwin: Guard two macros in darwin.h.
@ 2020-08-03 19:02 Iain Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain Sandoe @ 2020-08-03 19:02 UTC (permalink / raw)
  To: GCC-patches

Hi

Work on the Arm64 port shows that these two macros can be declared
ahead of the version in darwin.h which needs to override (for X86
and PPC this wasn't needed).

tested across the Darwin range currently supported.
pushed to master.
thanks
Iain

gcc/ChangeLog:

	* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): UNDEF before
	use.
	(DEF_MIN_OSX_VERSION): Only define if there's no existing
	def.
---
 gcc/config/darwin.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index f528b1766bf..55a5361cadb 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -652,6 +652,7 @@ extern GTY(()) int darwin_ms_struct;
    that the name *is* defined in this module, so it doesn't need to
    make them indirect.  */
 
+#undef ASM_DECLARE_FUNCTION_NAME
 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)			\
   do {									\
     const char *xname = NAME;						\
@@ -1059,7 +1060,9 @@ extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **);
    providing an osx-version-min of this unless overridden by the User.
    10.5 is the only version that fully supports all our archs so that's the
    fall-back default.  */
+#ifndef DEF_MIN_OSX_VERSION
 #define DEF_MIN_OSX_VERSION "10.5"
+#endif
 
 /* Later versions of ld64 support coalescing weak code/data without requiring
    that they be placed in specially identified sections.  This is the earliest
-- 
2.24.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-03 19:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 19:02 [pushed] Darwin: Guard two macros in darwin.h Iain Sandoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).