Hi,

As reported in the fediverse, sdl2 generates SIGILL on Mac G3s [0].

sdl2 is built with AltiVec support, runtime detection is present and
valid (see $WRKSRC/src/cpuinfo/SDL_cpuinfo.c), yet failing. So the
simple solution is to remove AltiVec from the build for now.

I've tested this on my PowerBook G4 against ffplay, mpv,
openttd and scummvm, without issues.

I've also tested successfully these ports on my Mac Mini G4, but this
time, using a kernel without the ALTIVEC option.

OK?

Charlène.


[0] https://empty.cafe/@will/106329827929064693


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/sdl2/Makefile,v
retrieving revision 1.34
diff -u -p -u -p -r1.34 Makefile
--- Makefile    23 Jan 2021 17:47:43 -0000      1.34
+++ Makefile    11 Jun 2021 19:07:43 -0000
@@ -5,7 +5,7 @@ COMMENT=        cross-platform multimedia libra
 V=             2.0.14
 DISTNAME=      SDL2-${V}
 PKGNAME=       sdl2-${V}
-REVISION=      1
+REVISION=      2
 CATEGORIES=    devel
 MASTER_SITES=  https://www.libsdl.org/release/
 
@@ -50,6 +50,13 @@ CONFIGURE_ENV+=      CPPFLAGS="-I${LOCALBASE}
 
 .if ${MACHINE_ARCH} == "hppa"
 CONFIGURE_ARGS+= --disable-atomic
+.endif
+
+# The assembly code contains AltiVec instructions, whose support is not
+# properly detected at runtime. Fix SIGILLs on macppc G3s, while keeping
+# it for powerpc64.
+.if ${MACHINE_ARCH} == "powerpc"
+CONFIGURE_ARGS+= --enable-altivec=no
 .endif
 
 # tests in test subdir, but interactive and not hooked up to build




Reply via email to