View | Details | Raw Unified | Return to bug 230789 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/libclc/Makefile (-1 / +2 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	libclc
4
PORTNAME=	libclc
5
DISTVERSION=	0.3.0.20180518
5
DISTVERSION=	0.3.0.20180518
6
PORTREVISION=	1
6
CATEGORIES=	devel
7
CATEGORIES=	devel
7
8
8
MAINTAINER=	x11@FreeBSD.org
9
MAINTAINER=	x11@FreeBSD.org
Lines 24-30 USES= gmake python:2.7,build gmake Link Here
24
USE_LDCONFIG=	yes
25
USE_LDCONFIG=	yes
25
MAKE_ENV=	MAKE=${GMAKE} DESTDIR=${STAGEDIR}
26
MAKE_ENV=	MAKE=${GMAKE} DESTDIR=${STAGEDIR}
26
27
27
LLVMVER=	${MESA_LLVM_VER:U60}
28
LLVMVER=	${MESA_LLVM_VER:U70}
28
29
29
ALL_TARGET=
30
ALL_TARGET=
30
31
(-)b/graphics/mesa-dri/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	mesa-dri
4
PORTNAME=	mesa-dri
5
PORTVERSION=	${MESAVERSION}
5
PORTVERSION=	${MESAVERSION}
6
PORTREVISION=	1
6
CATEGORIES=	graphics
7
CATEGORIES=	graphics
7
8
8
COMMENT=	OpenGL hardware acceleration drivers for DRI2+
9
COMMENT=	OpenGL hardware acceleration drivers for DRI2+
(-)b/graphics/mesa-dri/Makefile.common (-1 / +1 lines)
Lines 77-83 INSTALL_TARGET= install-strip Link Here
77
# need LLVM for libEGL wherever possible, but mixing GCC and LLVM breaks Gallium
77
# need LLVM for libEGL wherever possible, but mixing GCC and LLVM breaks Gallium
78
.if ${CHOSEN_COMPILER_TYPE} == clang \
78
.if ${CHOSEN_COMPILER_TYPE} == clang \
79
 || (${COMPONENT} == libs && ${ARCH} != sparc64)	# no working LLVM
79
 || (${COMPONENT} == libs && ${ARCH} != sparc64)	# no working LLVM
80
MESA_LLVM_VER?=	60
80
MESA_LLVM_VER?=	70
81
.endif
81
.endif
82
82
83
.if "${MESA_LLVM_VER}" != ""
83
.if "${MESA_LLVM_VER}" != ""
(-)b/graphics/mesa-dri/files/patch-llvm7 (+60 lines)
Added Link Here
1
commit d424be0feda5
2
Author: Jan Vesely <jan.vesely@rutgers.edu>
3
Date:   Tue May 22 17:52:30 2018 -0400
4
5
    clover: Fix build after llvm r332881.
6
    
7
    v2: fix whitespace and indentation
8
    
9
    r332881 added an extra parameter to the emit function.
10
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106619
11
    Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
12
    Reviewed-By: Aaron Watry <awatry@gmail.com>
13
    Tested-By: Aaron Watry <awatry@gmail.com>
14
    Tested-by: Kai Wasserb├Ąch <kai@dev.carbon-project.org>
15
---
16
 src/gallium/state_trackers/clover/llvm/codegen/native.cpp |  3 +--
17
 src/gallium/state_trackers/clover/llvm/compat.hpp         | 11 +++++++++++
18
 2 files changed, 12 insertions(+), 2 deletions(-)
19
20
diff --git src/gallium/state_trackers/clover/llvm/codegen/native.cpp src/gallium/state_trackers/clover/llvm/codegen/native.cpp
21
index 409f8ac32f..21f6c8c88a 100644
22
--- src/gallium/state_trackers/clover/llvm/codegen/native.cpp
23
+++ src/gallium/state_trackers/clover/llvm/codegen/native.cpp
24
@@ -126,13 +126,12 @@ namespace {
25
       {
26
          compat::pass_manager pm;
27
          ::llvm::raw_svector_ostream os { data };
28
-         compat::raw_ostream_to_emit_file fos(os);
29
 
30
          mod.setDataLayout(compat::get_data_layout(*tm));
31
          tm->Options.MCOptions.AsmVerbose =
32
             (ft == TargetMachine::CGFT_AssemblyFile);
33
 
34
-         if (tm->addPassesToEmitFile(pm, fos, ft))
35
+         if (compat::add_passes_to_emit_file(*tm, pm, os, ft))
36
             fail(r_log, build_error(), "TargetMachine can't emit this file");
37
 
38
          pm.run(mod);
39
diff --git src/gallium/state_trackers/clover/llvm/compat.hpp src/gallium/state_trackers/clover/llvm/compat.hpp
40
index 2e070b2eef..42a671b7fa 100644
41
--- src/gallium/state_trackers/clover/llvm/compat.hpp
42
+++ src/gallium/state_trackers/clover/llvm/compat.hpp
43
@@ -245,6 +245,17 @@ namespace clover {
44
 		::llvm::WriteBitcodeToFile(mod, os);
45
 #else
46
 		::llvm::WriteBitcodeToFile(&mod, os);
47
+#endif
48
+	}
49
+
50
+	template<typename TM, typename PM, typename OS, typename FT>
51
+	bool add_passes_to_emit_file(TM &tm, PM &pm, OS &os, FT &ft)
52
+	{
53
+		compat::raw_ostream_to_emit_file fos(os);
54
+#if HAVE_LLVM >= 0x0700
55
+		return tm.addPassesToEmitFile(pm, fos, nullptr, ft);
56
+#else
57
+		return tm.addPassesToEmitFile(pm, fos, ft);
58
 #endif
59
 	}
60
       }
(-)b/lang/beignet/Makefile (-2 / +2 lines)
Lines 4-10 Link Here
4
PORTNAME=	beignet
4
PORTNAME=	beignet
5
DISTVERSION=	1.3.2
5
DISTVERSION=	1.3.2
6
DISTVERSIONSUFFIX=	-source
6
DISTVERSIONSUFFIX=	-source
7
PORTREVISION=	3
7
PORTREVISION=	4
8
CATEGORIES=	lang
8
CATEGORIES=	lang
9
MASTER_SITES=	https://01.org/sites/default/files/
9
MASTER_SITES=	https://01.org/sites/default/files/
10
10
Lines 32-38 USE_GL= gl egl Link Here
32
USE_LDCONFIG=	${LOCALBASE}/lib/${PORTNAME}
32
USE_LDCONFIG=	${LOCALBASE}/lib/${PORTNAME}
33
SHEBANG_FILES=	src/git_sha1.sh backend/kernels/compile.sh
33
SHEBANG_FILES=	src/git_sha1.sh backend/kernels/compile.sh
34
ALL_TARGET=	all
34
ALL_TARGET=	all
35
LLVMVER=	${MESA_LLVM_VER:U60}
35
LLVMVER=	${MESA_LLVM_VER:U70}
36
36
37
CMAKE_ARGS=	-DCLANG_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/clang${LLVMVER} \
37
CMAKE_ARGS=	-DCLANG_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/clang${LLVMVER} \
38
		-DLLVM_AS_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-as${LLVMVER} \
38
		-DLLVM_AS_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-as${LLVMVER} \
(-)b/lang/clover/Makefile (+1 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	clover
3
PORTNAME=	clover
4
PORTVERSION=	${MESAVERSION}
4
PORTVERSION=	${MESAVERSION}
5
PORTREVISION=	1
5
CATEGORIES=	lang
6
CATEGORIES=	lang
6
7
7
COMMENT=	Mesa "Clover" OpenCL library
8
COMMENT=	Mesa "Clover" OpenCL library

Return to bug 230789