[Scummvm-git-logs] scummvm master -> 99c171b17716ac1fe1e5a8bdb088a21cc60d164d

dwatteau noreply at scummvm.org
Sat Oct 4 16:08:41 UTC 2025


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
a2e1496a1a BUILD: Simplify how posix_spawn() can be disabled on some targets
4eb1c6492c BUILD: MACOS: Avoid posix_spawn() when targeting macOS 10.4
99c171b177 BUILD: MACOS: Minor tweaks for OSXPPC stuff


Commit: a2e1496a1ade140cb142c5d78a50e9a95cf71acc
    https://github.com/scummvm/scummvm/commit/a2e1496a1ade140cb142c5d78a50e9a95cf71acc
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-04T17:54:36+02:00

Commit Message:
BUILD: Simplify how posix_spawn() can be disabled on some targets

Changed paths:
    configure


diff --git a/configure b/configure
index 8f1d058db9e..472f5d872dd 100755
--- a/configure
+++ b/configure
@@ -280,7 +280,7 @@ _detection_features_full=yes
 # be modified otherwise. Consider them read-only.
 _3d=no
 _posix=no
-_has_posix_spawn=no
+_has_posix_spawn=auto
 _has_fseeko_offt_64=no
 _has_fseeko64=no
 _has_fopen64=no
@@ -3280,7 +3280,7 @@ EOF
 
 		# enable SDL3 and set it up correctly
 		if test "$_dynamic_modules" = "yes" ; then
-			embuilder build sdl3 --pic 
+			embuilder build sdl3 --pic
 		else
 			embuilder build sdl3
 		fi
@@ -3295,6 +3295,8 @@ EOF
 			append_var SDL_LIBS "`$_sdlconfig --libs`"
 		fi
 
+		_has_posix_spawn=no
+
 		# We explicitly disable optional libraries if not enabled. "auto" would depend
 		# on whether the port has been used before (and is detected) which is unpredictable.
 		if test "$_freetype2" = yes; then
@@ -4780,11 +4782,14 @@ if test "$_posix" = yes ; then
 	add_line_to_config_mk 'POSIX = 1'
 
 	echo_n "Checking if posix_spawn is supported... "
+	if test "$_has_posix_spawn" != no ; then
 		cat > $TMPC << EOF
 #include <spawn.h>
 int main(void) { return posix_spawn(0, 0, 0, 0, 0, 0); }
 EOF
-	cc_check && test "$_host_os" != "emscripten" && _has_posix_spawn=yes
+		cc_check && _has_posix_spawn=yes
+	fi
+
 	echo $_has_posix_spawn
 	if test "$_has_posix_spawn" = yes ; then
 		append_var DEFINES "-DHAS_POSIX_SPAWN"


Commit: 4eb1c6492cf3ed883018e20272e65d1067b575eb
    https://github.com/scummvm/scummvm/commit/4eb1c6492cf3ed883018e20272e65d1067b575eb
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-04T17:54:36+02:00

Commit Message:
BUILD: MACOS: Avoid posix_spawn() when targeting macOS 10.4

If one targets macOS 10.4, but uses a newer SDK, posix_spawn() may be
found, but then it shouldn't be used, as the 10.4 libc doesn't have it.

It's only used for openUrl(), and launching a web browser on such
an old OS doesn't sound wise anyway.

Changed paths:
    configure


diff --git a/configure b/configure
index 472f5d872dd..e2a71bc13f5 100755
--- a/configure
+++ b/configure
@@ -3173,6 +3173,14 @@ EOF
 				fi
 			fi
 
+			# If one targets MacOS X 10.4, but uses a newer SDK, posix_spawn() may be
+			# found, but then it shouldn't be used, as the 10.4 libc doesn't have it.
+			# It's only used for openUrl(), and launching a web browser on such an old
+			# OS doesn't sound wise anyway.
+			if test "$_macos_min_version" -lt 1050 ; then
+				_has_posix_spawn=no
+			fi
+
 			# When building with SDK 10.14 or above, we cannot compile the 32 bits dock plugin
 			# Assume the SDK version is the same as the min version.
 			if test "$_macos_min_version" -gt 101399 ; then


Commit: 99c171b17716ac1fe1e5a8bdb088a21cc60d164d
    https://github.com/scummvm/scummvm/commit/99c171b17716ac1fe1e5a8bdb088a21cc60d164d
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-04T18:04:25+02:00

Commit Message:
BUILD: MACOS: Minor tweaks for OSXPPC stuff

Changed paths:
    configure


diff --git a/configure b/configure
index e2a71bc13f5..c1ad00f642d 100755
--- a/configure
+++ b/configure
@@ -3002,14 +3002,6 @@ case $_host_os in
 		fi
 		;;
 	darwin*)
-		case $_host_cpu in
-		powerpc*)
-			if test "$_dynamic_modules" = no ; then
-				echo "WARNING: Building static engines will probably fail at link time on Mac PowerPC"
-			fi
-			;;
-		esac
-
 		append_var DEFINES "-DMACOSX"
 		append_var LIBS "-framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI"
 		# SDL2 doesn't seem to add Cocoa for us.
@@ -3117,7 +3109,7 @@ case $_host_os in
 
 		echocheck "macOS deployment target"
 		cat > $TMPC << EOF
-#include "AvailabilityMacros.h"
+#include <AvailabilityMacros.h>
 
 #define _DIGIT(x) #x
 #define DIGIT(x) _DIGIT(x)
@@ -3151,24 +3143,24 @@ EOF
 
 		# Version-specific quirks
 		if test -n "$_macos_min_version" ; then
-			# When building for MacOS X 10.5 or below
 			if test "$_macos_min_version" -lt 1060 ; then
 				add_line_to_config_mk 'MACOSX_LEOPARD_OR_BELOW = 1'
 
-				# OSX 10.4/10.5 has no native C++11 support, thus we need to
-				# embed an updated libstdc++ in the bundle, and fix its
-				# dynamic references with install_name_tool(1), which requires
-				# linking with a bit of padding for the updated references.
+				# OSX 10.4/10.5 has no native C++11 support, so we need to
+				# embed an updated libstdc++ in the bundle. This means that
+				# its path must be fixed with install_name_tool(1), and this
+				# requires padding the length of all library paths first.
 				append_var LDFLAGS "-Wl,-headerpad_max_install_names"
 
 				if test "$_debug_build" != no ; then
-					# Prefer DWARF over stabs on older OSX; this requires a
-					# newer GDB, but we need it for the updated toolchain
-					# anyway. This improves the debugging experience quite
+					# Prefer DWARF-2 over stabs on older OSX; this requires a
+					# newer GDB, but the updated C++11 toolchain already imposes
+					# it anyway. This improves the debugging experience quite
 					# a lot, and it still creates meaningful traces for the
-					# Crash Reporter of OSX 10.4. -fvar-tracking-assignments
-					# should be disabled then, as it seems to cause issues
-					# and we can't use the later DWARF version it recommends.
+					# Crash Reporter of OSX 10.4.
+					#
+					# -fvar-tracking-assignments should also be disabled,
+					# as it does cause issues on (older) OSX with no DWARF-4.
 					append_var CXXFLAGS "-gdwarf-2 -fno-var-tracking-assignments"
 				fi
 			fi
@@ -3193,6 +3185,14 @@ EOF
 			# We use -force_cpusubtype_ALL to ensure the binary runs on every
 			# PowerPC machine.
 			append_var LDFLAGS "-force_cpusubtype_ALL"
+
+			# The PPC linker hits internal errors when the main binary gets too
+			# large (even when upgrading to the latest cctools release through
+			# MacPorts). So, unless one just builds a small subset of engines,
+			# dynamic modules must be used.
+			if test "$_dynamic_modules" = no ; then
+				echo "WARNING: Building static engines will probably fail at link time on Mac PowerPC"
+			fi
 			;;
 		aarch64)
 			add_line_to_config_mk 'MACOSX_ARM64 = 1'




More information about the Scummvm-git-logs mailing list