Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Use and enable MKLLVMRT for HAVE_MESA_VER=18.



details:   https://anonhg.NetBSD.org/src/rev/079c9ffd0ddc
branches:  trunk
changeset: 450032:079c9ffd0ddc
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Apr 03 15:26:34 2019 +0000

description:
Use and enable MKLLVMRT for HAVE_MESA_VER=18.

diffstat:

 external/mit/xorg/lib/gallium/Makefile |  18 ++++++++----------
 external/mit/xorg/lib/libmesa.mk       |   4 ++--
 share/mk/bsd.README                    |   7 ++++++-
 share/mk/bsd.own.mk                    |  21 ++++++++++++---------
 4 files changed, 28 insertions(+), 22 deletions(-)

diffs (146 lines):

diff -r af990e6143da -r 079c9ffd0ddc external/mit/xorg/lib/gallium/Makefile
--- a/external/mit/xorg/lib/gallium/Makefile    Wed Apr 03 15:23:29 2019 +0000
+++ b/external/mit/xorg/lib/gallium/Makefile    Wed Apr 03 15:26:34 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2019/03/10 10:51:58 mrg Exp $
+# $NetBSD: Makefile,v 1.20 2019/04/03 15:26:34 joerg Exp $
 
 # Link the gallium mega driver.
 
@@ -13,15 +13,13 @@
 DRIDIR=                ${X11USRLIBDIR}/modules/dri
 DRIDEBUGDIR=   ${DEBUGDIR}${X11USRLIBDIR}/modules/dri
 
-LLVM_TOOLCONF_OBJDIR!= cd ${NETBSDSRCDIR}/tools/llvm && ${PRINTOBJDIR}
-LLVM_INCLUDE_OBJDIR!=  cd ${NETBSDSRCDIR}/tools/llvm-include && ${PRINTOBJDIR}
+LLVM_INCLUDE_OBJDIR!=  cd ${NETBSDSRCDIR}/external/bsd/llvm/include && ${PRINTOBJDIR}
 
 CXXFLAGS+=     -std=c++11
 CFLAGS+=       -std=gnu11
 CPPFLAGS+=     -I${DESTDIR}${X11INCDIR}/libdrm \
                -I${NETBSDSRCDIR}/external/bsd/llvm/dist/llvm/include \
-               -I${LLVM_TOOLCONF_OBJDIR}/config/include \
-               -I${LLVM_INCLUDE_OBJDIR}
+               -I${LLVM_INCLUDE_OBJDIR} -I${NETBSDSRCDIR}/external/bsd/llvm/config
 
 GALLIUM_SUBDIRS= \
        auxiliary \
@@ -91,7 +89,7 @@
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 BUILD_RADEON=1
 BUILD_I915=1
-.if ${MKLLVM} == "yes"
+.if ${MKLLVMRT} != "no"
 BUILD_LLVMPIPE=1
 .endif
 .endif
@@ -160,7 +158,7 @@
        draw_vs_exec.c \
        draw_vs_variant.c
 
-.if ${MKLLVM:Uno} != "no"
+.if ${MKLLVMRT} != "no"
 GALLIUM_SOURCES.auxiliary/draw+= \
        draw_llvm.c \
        draw_llvm_sample.c \
@@ -963,7 +961,7 @@
 # gallium drivers requiring LLVM
 .if ${BUILD_LLVMPIPE} == 1 || ${BUILD_RADEON} == 1
 
-LLVM_LIB_DIR!= cd ${.CURDIR}/../../../../../external/bsd/llvm/lib; ${PRINTOBJDIR}
+LLVM_LIB_DIR!= cd ${.CURDIR}/../../../../../external/bsd/llvm/librt; ${PRINTOBJDIR}
 
 LLVM_LIBS=     \
                TransformsCoroutines \
@@ -1023,8 +1021,8 @@
                Support
 
 .for llvm_library in ${LLVM_LIBS}
-DPADD+=        ${LLVM_LIB_DIR}/libLLVM${llvm_library}/libLLVM${llvm_library}.a
-LDADD+=        ${LLVM_LIB_DIR}/libLLVM${llvm_library}/libLLVM${llvm_library}.a
+DPADD+=        ${LLVM_LIB_DIR}/libLLVM${llvm_library}/libLLVM${llvm_library}_pic.a
+LDADD+=        ${LLVM_LIB_DIR}/libLLVM${llvm_library}/libLLVM${llvm_library}_pic.a
 .endfor
 
 .endif  # ${BUILD_LLVM_PIPE} == 1 || ${BUILD_RADEON} == 1
diff -r af990e6143da -r 079c9ffd0ddc external/mit/xorg/lib/libmesa.mk
--- a/external/mit/xorg/lib/libmesa.mk  Wed Apr 03 15:23:29 2019 +0000
+++ b/external/mit/xorg/lib/libmesa.mk  Wed Apr 03 15:26:34 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: libmesa.mk,v 1.5 2019/03/15 03:10:25 mrg Exp $
+#      $NetBSD: libmesa.mk,v 1.6 2019/04/03 15:26:34 joerg Exp $
 #
 # Consumer of this Makefile should set MESA_SRC_MODULES.
 
@@ -527,7 +527,7 @@
        -DENABLE_SHADER_CACHE \
        -DHAVE_MINCORE
 
-.if ${MKLLVM} == "yes"
+.if ${MKLLVMRT} != "no"
 CPPFLAGS+=     \
        -DHAVE_LLVM=0x0700 \
        -DMESA_LLVM_VERSION_PATCH=0
diff -r af990e6143da -r 079c9ffd0ddc share/mk/bsd.README
--- a/share/mk/bsd.README       Wed Apr 03 15:23:29 2019 +0000
+++ b/share/mk/bsd.README       Wed Apr 03 15:26:34 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.README,v 1.388 2019/04/03 15:17:23 joerg Exp $
+#      $NetBSD: bsd.README,v 1.389 2019/04/03 15:26:35 joerg Exp $
 #      @(#)bsd.README  8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -322,6 +322,11 @@
                (see below for details).
                Default: no
 
+MKLLVMRT       If "yes", build the LLVM PIC libraries necessary for the
+               AMDGPU backend and the native JIT of the target architecture,
+               if supported.
+               Default: no, enabled automatically with HAVE_MESA_VER=18.
+
 MKLVM          If "no", don't build or install the logical volume manager
                and device mapper tools and libraries
                Default: yes
diff -r af990e6143da -r 079c9ffd0ddc share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Wed Apr 03 15:23:29 2019 +0000
+++ b/share/mk/bsd.own.mk       Wed Apr 03 15:26:34 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.1121 2019/04/03 15:23:29 joerg Exp $
+#      $NetBSD: bsd.own.mk,v 1.1122 2019/04/03 15:26:35 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1288,6 +1288,17 @@
 MKLIBCXX:=     yes
 .endif
 
+# MesaLib.old and MesaLib7 go together, and MesaLib is alone.
+HAVE_MESA_VER?=        10
+.if ${HAVE_MESA_VER} == "10"
+EXTERNAL_MESALIB_DIR?= MesaLib.old
+.elif ${HAVE_MESA_VER} == "18"
+EXTERNAL_MESALIB_DIR?= MesaLib
+.  if ${MKX11} != "no"
+MKLLVMRT:=             yes
+.  endif
+.endif
+
 #
 # install(1) parameters.
 #
@@ -1460,14 +1471,6 @@
 HAVE_XORG_SERVER_VER?=120
 .endif
 
-# MesaLib.old and MesaLib7 go together, and MesaLib is alone.
-HAVE_MESA_VER?=        10
-.if ${HAVE_MESA_VER} == "10"
-EXTERNAL_MESALIB_DIR?= MesaLib.old
-.else
-EXTERNAL_MESALIB_DIR?= MesaLib
-.endif
-
 .if ${HAVE_XORG_SERVER_VER} == "120"
 XORG_SERVER_SUBDIR?=xorg-server
 . if ${MACHINE} == "amd64" || ${MACHINE} == "i386"



Home | Main Index | Thread Index | Old Index