configure: darwin: update GCC, use SDL threads

The simulator on macOS has been broken since macOS 26.4
was introduced. On macOS 26.4, 26.5, and the 27 beta,
thread setup fails in make_context (firmware/asm/thread-
unix.c), because sigaltstack returns an "Operation not
permitted" error. Fall back to SDL threads until this
can be fixed.

Also update GCC to keep it in sync with the latest
Homebrew formula
(https://formulae.brew.sh/formula/gcc).

Change-Id: Ib08ac81ede00c577f28a85c7886f716e7504bbe9
This commit is contained in:
Christian Soffke 2026-06-19 17:49:48 +02:00
parent 7a32c8b5e3
commit cd699e5448

10
tools/configure vendored
View file

@ -394,12 +394,14 @@ simcc () {
;;
Darwin)
sigaltstack=`check_sigaltstack`
# FIXME: sigaltstack fails with "Operation not permitted"
# in make_context (firmware/asm/thread-unix.c) on latest
# versions of macOS (≥ 26.4). Fall back to SDL threads.
echo "Darwin host detected"
if $CC --version | grep -q "clang"; then
CC=gcc-15
AR=gcc-ar-15
CPP=cpp-15
CC=gcc-16
AR=gcc-ar-16
CPP=cpp-16
fi
LDOPTS="$LDOPTS -ldl"
SHARED_LDFLAGS="-dynamiclib -Wl,-no_warn_duplicate_libraries"