From cd197cfa4b22acd7fcf60cce4b84f39c9865ecc9 Mon Sep 17 00:00:00 2001 From: stsp Date: Sat, 21 Jan 2017 11:23:09 +0000 Subject: [PATCH] Disable the shader cache in Mesa on powerpc. Its implementation uses gcc atomic builtins on a 64 bit integer which is not supported on 32 bit powerpc. Makes 3D work again on a PowerBook G4 with an ATI RV350 video card. tweak and ok jsg@ --- lib/mesa/Makefile.bsd-wrapper | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/mesa/Makefile.bsd-wrapper b/lib/mesa/Makefile.bsd-wrapper index 632cd597c..34f2d2f48 100644 --- a/lib/mesa/Makefile.bsd-wrapper +++ b/lib/mesa/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.7 2016/12/11 08:53:19 jsg Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.8 2017/01/21 11:23:09 stsp Exp $ .include @@ -38,6 +38,12 @@ CONFIGURE_ARGS= --with-dri-drivers=${DRI_DRIVERS} \ CONFIGURE_ARGS+= USER_CFLAGS="-march=i586" USER_CXXFLAGS="-march=i586" .endif +# powerpc lacks the __sync_add_and_fetch8 gcc atomic builtin +# which is used by the shader cache implementation +.if ${MACHINE_ARCH} == powerpc +CONFIGURE_ARGS+= --disable-shader-cache +.endif + .if ${MACHINE} == alpha # -O2 causes gcc ICE on main/format_pack.c and program/prog_execute.c O1= -fdefer-pop -fguess-branch-probability -fcprop-registers \