NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: toolchain/56288: ./build.sh tools does not work on Apple M1 Macs (#2) due to gcc build



> Undefined symbols for architecture arm64:
>   "_host_hooks", referenced from:
>       c_common_no_more_pch() in c-pch.o
>       general_init(char const*, bool) in libbackend.a(toplev.o)
>       gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
>       gt_pch_restore(__sFILE*) in libbackend.a(ggc-common.o)

OK, this seems obvious now i look closer.

dist/gcc/config/host-darwin.c does not define host_hooks like
it should.  can you try this patch?


.mrg.


Index: external/gpl3/gcc/dist/gcc/config/host-darwin.c
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/gcc/config/host-darwin.c,v
retrieving revision 1.1.1.10
diff -p -u -r1.1.1.10 host-darwin.c
--- external/gpl3/gcc/dist/gcc/config/host-darwin.c	10 Apr 2021 22:09:44 -0000	1.1.1.10
+++ external/gpl3/gcc/dist/gcc/config/host-darwin.c	11 Jul 2021 21:36:59 -0000
@@ -22,6 +22,8 @@
 #include "coretypes.h"
 #include "diagnostic-core.h"
 #include "config/host-darwin.h"
+#include "hosthooks.h"
+#include "hosthooks-def.h"
 
 /* Yes, this is really supposed to work.  */
 /* This allows for a pagesize of 16384, which we have on Darwin20, but should
@@ -78,3 +80,5 @@ darwin_gt_pch_use_address (void *addr, s
 
   return ret;
 }
+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;


Home | Main Index | Thread Index | Old Index