Tested on x86_64, i686 darwin17 and aarch64 darwin21, OK for trunk, or alternate solution? thanks, Iain
--- 8< --- Recent merges from libphobos have broken bootstrap on many/most Darwin version (those with 32bit multilibs, 32bit hosts, aarch64 and powerpc). This is because the thread data are not imported into osthread.d. Fixed thus: libphobos/ChangeLog: * libdruntime/core/thread/osthread.d: Import thread data for i686, aarch64, powerpc and powerpc64. Signed-off-by: Iain Sandoe <i...@sandoe.co.uk> --- libphobos/libdruntime/core/thread/osthread.d | 35 ++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/libphobos/libdruntime/core/thread/osthread.d b/libphobos/libdruntime/core/thread/osthread.d index e5f0cadbbf2..a9470616277 100644 --- a/libphobos/libdruntime/core/thread/osthread.d +++ b/libphobos/libdruntime/core/thread/osthread.d @@ -81,6 +81,13 @@ else version (PPC) version = AsmExternal; } } +else version (PPC64) +{ + version (Posix) + { + version = AsmExternal; + } +} else version (MIPS_O32) { version (Posix) @@ -157,9 +164,33 @@ else version (Posix) { import core.sys.darwin.mach.kern_return : KERN_SUCCESS; import core.sys.darwin.mach.port : mach_port_t; - import core.sys.darwin.mach.thread_act : mach_msg_type_number_t, thread_get_state, thread_resume, - thread_suspend, x86_THREAD_STATE64, x86_THREAD_STATE64_COUNT, x86_thread_state64_t; + import core.sys.darwin.mach.thread_act : mach_msg_type_number_t, + thread_get_state, thread_resume, thread_suspend; import core.sys.darwin.pthread : pthread_mach_thread_np; + version (X86) + { + import core.sys.darwin.mach.thread_act : + x86_THREAD_STATE32, x86_THREAD_STATE32_COUNT, x86_thread_state32_t; + } + version (X86_64) + { + import core.sys.darwin.mach.thread_act : + x86_THREAD_STATE64, x86_THREAD_STATE64_COUNT, x86_thread_state64_t; + } + version (AArch64) + { + import core.sys.darwin.mach.thread_act : ARM_THREAD_STATE64, ARM_THREAD_STATE64_COUNT, arm_thread_state64_t; + } + version (PPC) + { + import core.sys.darwin.mach.thread_act : + PPC_THREAD_STATE32, PPC_THREAD_STATE32_COUNT, ppc_thread_state32_t; + } + version (PPC64) + { + import core.sys.darwin.mach.thread_act : + PPC_THREAD_STATE64, PPC_THREAD_STATE64_COUNT, ppc_thread_state64_t; + } } } -- 2.39.2 (Apple Git-143)