summaryrefslogtreecommitdiff
path: root/Toolchain
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2023-04-28 16:14:06 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-29 08:24:18 +0200
commita7f61a15af66f9d227f4ab8f53122d9fccf01210 (patch)
treef1d5fe69950aa2299ad4c33791b84c53ee06b028 /Toolchain
parent6aa392f6e413be166879c3fef3864905d3474aa4 (diff)
downloadserenity-a7f61a15af66f9d227f4ab8f53122d9fccf01210.zip
Toolchain: Fix self-built QEMU crashing on startup on macOS
If the SDL libraries are present on the system, QEMU will attempt to use that for rendering the UI. This causes a crash when the AArch64 port starts up with the following message: > NSWindow drag regions should only be invalidated on the Main Thread! Fix this by explicitly disabling SDL support.
Diffstat (limited to 'Toolchain')
-rwxr-xr-xToolchain/BuildQemu.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/Toolchain/BuildQemu.sh b/Toolchain/BuildQemu.sh
index f7a87de1ab..f8f5136083 100755
--- a/Toolchain/BuildQemu.sh
+++ b/Toolchain/BuildQemu.sh
@@ -53,9 +53,13 @@ if [ -z "$MAKEJOBS" ]; then
MAKEJOBS=$(nproc)
fi
+EXTRA_ARGS=""
if [[ $(uname) == "Darwin" ]]
then
UI_LIB=cocoa
+
+ # SDL causes a crash on startup: "NSWindow drag regions should only be invalidated on the Main Thread!"
+ EXTRA_ARGS="--disable-sdl"
else
UI_LIB=gtk
fi
@@ -66,7 +70,8 @@ pushd "$DIR/Build/qemu"
"$DIR"/Tarballs/qemu-"${QEMU_VERSION}"/configure --prefix="$PREFIX" \
--target-list=aarch64-softmmu,x86_64-softmmu \
--enable-$UI_LIB \
- --enable-slirp || exit 1
+ --enable-slirp \
+ $EXTRA_ARGS || exit 1
make -j "$MAKEJOBS" || exit 1
make install || exit 1
popd