I recently noticed that libphobos isn't enable by default on 32-bit Darwin with the target triples determined by config.guess. E.g. on a Darwin 15 system the target triple is something like i386-apple-darwin15.6.0 while configure.tgt only matches i?86-*-darwin1[2-7].
This patch also allows such minor and micro versions. Tested on i386-apple-darwin15.6.0. I'd commit this as obvious, but there's more: on older Darwin versions (9, 10, and 11), configure.tgt only sets LIBDRUNTIME_ONLY. However, toplevel configure.ac doesn't take this into account when deciding whether to enable libphobos or not. I wonder if it should, though. I guess it could: on my Darwin 11 system, test results (with explicit --enable-libphobos) aren't too bad: === gdc tests === Running target unix FAIL: gdc.dg/gdc300.d (test for excess errors) WARNING: gdc.test/compilable/ctfe_math.d (test for excess errors) program timed out. UNRESOLVED: gdc.test/runnable/stress.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/stress.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/test12197.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/test12197.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc2.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc2.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc3.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc3.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable_cxx/cpp_stdlib.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable_cxx/cpp_stdlib.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable_cxx/cppa.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable_cxx/cppa.d -g compilation failed to produce executable UNRESOLVED: gdc.test/runnable_cxx/cppa.d -g -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable_cxx/cppa.d -shared-libphobos compilation failed to produce executable === gdc Summary for unix === # of expected passes 12849 # of unexpected failures 1 # of unresolved testcases 16 # of unsupported tests 611 Running target unix/-m64 FAIL: gdc.dg/gdc300.d (test for excess errors) UNRESOLVED: gdc.test/runnable/stress.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/stress.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/test12197.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/test12197.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc2.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc2.d -shared-libphobos compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc3.d compilation failed to produce executable UNRESOLVED: gdc.test/runnable/wc3.d -shared-libphobos compilation failed to produce executable === gdc Summary for unix/-m64 === # of expected passes 12859 # of unexpected failures 1 # of unresolved testcases 10 # of unsupported tests 610 === gdc Summary === # of expected passes 25708 # of unexpected failures 2 # of unresolved testcases 26 # of unsupported tests 1221 /private/var/gcc/regression/master/10.7-gcc-32/build/gcc/gdc version 16.0.0 20250626 (experimental) [master 5d613f473126772c47180d895b5ca438329534e2] (GCC) === libphobos tests === Running target unix FAIL: libphobos.druntime/shared/core/internal/gc/impl/conservative/gc.d (test for excess errors) FAIL: libphobos.druntime/shared/core/thread/fiber/base.d execution test FAIL: libphobos.druntime/shared/core/time.d execution test FAIL: libphobos.druntime/shared/rt/monitor_.d execution test FAIL: libphobos.druntime/static/core/internal/gc/impl/conservative/gc.d (test for excess errors) FAIL: libphobos.shared/host.c -ldl -pthread execution test FAIL: libphobos.shared/load_linkdep.d -shared-libphobos -ldl execution test === libphobos Summary for unix === # of expected passes 504 # of unexpected failures 7 # of unsupported tests 1 Running target unix/-m64 FAIL: libphobos.druntime/shared/core/thread/fiber/base.d execution test FAIL: libphobos.druntime/shared/core/time.d execution test FAIL: libphobos.druntime/shared/rt/monitor_.d execution test FAIL: libphobos.shared/host.c -ldl -pthread execution test FAIL: libphobos.shared/load_linkdep.d -shared-libphobos -ldl execution test === libphobos Summary for unix/-m64 === # of expected passes 506 # of unexpected failures 5 # of unsupported tests 1 === libphobos Summary === # of expected passes 1010 # of unexpected failures 12 # of unsupported tests 2 Thoughts? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2025-06-30 Rainer Orth <r...@cebitec.uni-bielefeld.de> libphobos: * configure.tgt <i?86-*-darwin1[2-7]>: Also consider minor versions supported.
# HG changeset patch # Parent 6faf58fc5f919a561f8bb1df3fc2f1cfd3d67e5e libphobos: Fully enable Darwin/i386 support diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt --- a/libphobos/configure.tgt +++ b/libphobos/configure.tgt @@ -64,7 +64,7 @@ case "${target}" in *-*-darwin9* | *-*-darwin1[01]*) LIBDRUNTIME_ONLY=yes ;; - x86_64-*-darwin1[2-9]* | x86_64-*-darwin2* | i?86-*-darwin1[2-7]) + x86_64-*-darwin1[2-9]* | x86_64-*-darwin2* | i?86-*-darwin1[2-7]*) LIBPHOBOS_SUPPORTED=yes ;; x86_64-*-freebsd* | i?86-*-freebsd*)