On Sat, 30 May 2026 14:59:02 +0100
Stuart Henderson <[email protected]> wrote:

> similar to the issue with libpixman, devel/sdl2 fails on i386 with
> LLVM 22. from naddy's comment:
> 
> | LLVM has dropped the ability to generate vectorized code using
> compiler | intrinsics for chips with MMX but without SSE2.
> 
> presumably this applies to SSE as well.
> 
> I've committed already to unbreak my bulk (the list of ports depending
> on this is pretty long), but mailing to let you know in case you would
> like to do something different longer-term.

The future of sdl2 applications might be in eventually using
sdl2-compat[1] which is a compatibility layer on top of SDL3. Should
have the benefit of not having a rotting codebase while all the work is
happening in SDL3 nowadays.

I have heard that some Linux distros have started using it, at least
for some of their SDL2 applications [2][3]. If SDL3 doesn't have issues
with MMX/SSE, then maybe it's time for me to look into this...

The work of rolling this out and testing it seems a bit daunting, as
I'm not sure there are any guarantees that all the users will be okay
with this switch, which is why I haven't tackled it so far.

(btw there is also sdl12-compat [4] for legacy SDL1.2, which may be an
easier first candidate to switch to...)

[1] https://github.com/libsdl-org/sdl2-compat
[2] https://packages.debian.org/sid/libsdl2-compat
[3] https://www.phoronix.com/news/Steam-Runtime-November-2025
[4] https://github.com/libsdl-org/sdl12-compat

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/Makefile,v
> diff -u -p -r1.69 Makefile
> --- Makefile  22 Feb 2026 18:26:23 -0000      1.69
> +++ Makefile  30 May 2026 13:56:12 -0000
> @@ -1,6 +1,7 @@
>  COMMENT=     cross-platform multimedia library
>  
>  V=           2.32.10
> +REVISION=    0
>  DISTNAME=    SDL2-${V}
>  PKGNAME=     sdl2-${V}
>  
> @@ -53,6 +54,12 @@ CONFIGURE_ENV+=    CPPFLAGS="-I${LOCALBASE}
>  
>  .if ${MACHINE_ARCH} == "hppa"
>  CONFIGURE_ARGS+= --disable-atomic
> +.endif
> +
> +.if ${MACHINE_ARCH} == "i386"
> +CONFIGURE_ARGS+= --disable-mmx \
> +             --disable-sse \
> +             --enable-sse2
>  .endif
>  
>  # The assembly code contains AltiVec instructions, whose support is
> not

Reply via email to