Mach-O objects prefix section names with double underscore instead of
period.  Use correct exports section name on systems that use Mach-O.

gcc/algol68/ChangeLog:

        * a68.h (A68_EXPORT_SECTION_NAME): Prefix name with double
        underscores for Mach-O objects.

Signed-off-by: Pietro Monteiro <[email protected]>
---
 gcc/algol68/a68.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/algol68/a68.h b/gcc/algol68/a68.h
index 13603061290..c4895ae6527 100644
--- a/gcc/algol68/a68.h
+++ b/gcc/algol68/a68.h
@@ -73,7 +73,11 @@ enum
 /* The section name we use when reading and writing export data.  */
 
 #ifndef A68_EXPORT_SECTION_NAME
-#define A68_EXPORT_SECTION_NAME ".a68_exports"
+# ifdef OBJECT_FORMAT_MACHO
+#   define A68_EXPORT_SECTION_NAME "__a68_exports"
+# else
+#   define A68_EXPORT_SECTION_NAME ".a68_exports"
+# endif
 #endif
 
 /* ga68 export format definitions.  See ga68-exports.pk.  */
-- 
2.43.0

Reply via email to