From 9e0d313431249b5af08996e230597b7cbad9a77b Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 21 Dec 2022 03:01:30 +0100 Subject: [PATCH] Fix internal sdlnet build on macOS, enables nullmodem/modem support on macOS --- build-debug-macos | 6 ++---- build-macos | 6 ++---- vs/sdlnet/build-dosbox.sh | 4 ++++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build-debug-macos b/build-debug-macos index 2d5ec8bf278..e59ef2b7170 100755 --- a/build-debug-macos +++ b/build-debug-macos @@ -16,11 +16,9 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh echo Compiling our internal SDL 1.x (cd vs/sdl && ./build-dosbox.sh) || exit 1 -# FIXME: SDLnet will compile a static library that targets a foreign architecture, -# and then ld will complain about it???????? # prefer to compile against our own copy of SDLnet 1.x -#echo Compiling our internal SDLnet 1.x -#(cd vs/sdlnet && ./build-dosbox.sh) || exit 1 +echo Compiling our internal SDLnet 1.x +(cd vs/sdlnet && ./build-dosbox.sh) || exit 1 # prefer to compile against our own zlib echo Compiling our internal zlib diff --git a/build-macos b/build-macos index 7347d9092af..b96a3eeab08 100755 --- a/build-macos +++ b/build-macos @@ -22,11 +22,9 @@ export LDFLAGS="$nld$LDFLAGS" export CPPFLAGS="$new$CPPFLAGS" export CXXFLAGS="$new$CXXFLAGS" -# FIXME: SDLnet will compile a static library that targets a foreign architecture, -# and then ld will complain about it???????? # prefer to compile against our own copy of SDLnet 1.x -#echo Compiling our internal SDLnet 1.x -#(cd vs/sdlnet && ./build-dosbox.sh) || exit 1 +echo Compiling our internal SDLnet 1.x +(cd vs/sdlnet && ./build-dosbox.sh) || exit 1 # prefer to compile against our own zlib echo Compiling our internal zlib diff --git a/vs/sdlnet/build-dosbox.sh b/vs/sdlnet/build-dosbox.sh index 2bef573e66f..b5dcc2185fb 100755 --- a/vs/sdlnet/build-dosbox.sh +++ b/vs/sdlnet/build-dosbox.sh @@ -51,3 +51,7 @@ if [ "$1" == "hx-dos" ]; then cp SDLnet.c.default SDLnet.c || exit 1 fi +# Delete libSDLmain.a and libSDL.a from archive file +# otherwise linking will fail on macOS +ar dv linux-host/lib/libSDL_net.a libSDLmain.a || true +ar dv linux-host/lib/libSDL_net.a libSDL.a || true \ No newline at end of file