Module Name:    src
Committed By:   mrg
Date:           Sun Jun  2 11:35:55 UTC 2019

Modified Files:
        src/external/mit/xorg/lib/gallium: Makefile
        src/share/mk: bsd.own.mk

Log Message:
fix building x86 with X11 but not LLVM:

- change the defaults for MKLLVMRT and MKX11 so we don't have to
  force-override later.  this makes "build.sh -V MKLLVMRT=no"
  work to disable building the LLVM Mesa components.

- in gallium, don't BUILD_RADEON if MKLLVMRT is no.

this stops GL from working, but basic X seems OK enough for Xvideo
to still work on modern radeon (ie, video mostly works fine, though
eg, "mpv -vo gpu" won't.  use "mpv -vo xv".)


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/mit/xorg/lib/gallium/Makefile
cvs rdiff -u -r1.1143 -r1.1144 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/lib/gallium/Makefile
diff -u src/external/mit/xorg/lib/gallium/Makefile:1.28 src/external/mit/xorg/lib/gallium/Makefile:1.29
--- src/external/mit/xorg/lib/gallium/Makefile:1.28	Thu May 30 23:15:46 2019
+++ src/external/mit/xorg/lib/gallium/Makefile	Sun Jun  2 11:35:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2019/05/30 23:15:46 maya Exp $
+# $NetBSD: Makefile,v 1.29 2019/06/02 11:35:55 mrg Exp $
 
 # Link the gallium mega driver.
 
@@ -89,9 +89,9 @@ BUILD_VDPAU=0
 BUILD_LLVMPIPE=0
 BUILD_I915=0
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-BUILD_RADEON=1
 BUILD_I915=1
 .if ${MKLLVMRT} != "no"
+BUILD_RADEON=1
 BUILD_LLVMPIPE=1
 .endif
 .endif

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1143 src/share/mk/bsd.own.mk:1.1144
--- src/share/mk/bsd.own.mk:1.1143	Thu May 30 21:33:57 2019
+++ src/share/mk/bsd.own.mk	Sun Jun  2 11:35:55 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1143 2019/05/30 21:33:57 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1144 2019/06/02 11:35:55 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1148,6 +1148,20 @@ MKRADEONFIRMWARE.i386=		yes
 # Only install the tegra firmware on evbarm.
 MKTEGRAFIRMWARE.evbarm=		yes
 
+# MesaLib.old and MesaLib7 go together, and MesaLib is alone.
+HAVE_MESA_VER?=	18
+.if ${HAVE_MESA_VER} == "10"
+EXTERNAL_MESALIB_DIR?=	MesaLib.old
+.elif ${HAVE_MESA_VER} == "18"
+EXTERNAL_MESALIB_DIR?=	MesaLib
+.endif
+
+# Default to LLVM run-time if x86 and X11 and Mesa 18
+.if ${MKX11} != "no" && ${HAVE_MESA_VER} == "18"
+MKLLVMRT.amd64=		yes
+MKLLVMRT.i386=		yes
+.endif
+
 #
 # MK* options which default to "no".  Note that MKZFS has a different
 # default for some platforms, see above.  Please keep alphabetically
@@ -1281,18 +1295,6 @@ _NEEDS_LIBCXX.x86_64=		yes
 MKLIBCXX:=	yes
 .endif
 
-# MesaLib.old and MesaLib7 go together, and MesaLib is alone.
-HAVE_MESA_VER?=	18
-.if ${HAVE_MESA_VER} == "10"
-EXTERNAL_MESALIB_DIR?=	MesaLib.old
-.elif ${HAVE_MESA_VER} == "18"
-EXTERNAL_MESALIB_DIR?=	MesaLib
-.  if ${MKX11} != "no" && \
-    (${MACHINE} == "amd64" || ${MACHINE} == "i386")
-MKLLVMRT:=		yes
-.  endif
-.endif
-
 #
 # install(1) parameters.
 #

Reply via email to