Ticket #14076: mesa-17.1.10.patchset

File mesa-17.1.10.patchset, 17.6 KB (added by cocobean, 7 years ago)

Mesa 17.1.10 patchset

Line 
1From ec8d0a5d3dffdb41b48d2dd1e83c5a05bad0e95f Mon Sep 17 00:00:00 2001
2From: Jerome Duval <jerome.duval@gmail.com>
3Date: Mon, 11 Sep 2017 21:29:14 +0200
4Subject: Haiku patch
5
6
7diff --git a/configure.ac b/configure.ac
8index fd346c8..0fdfb5b 100644
9--- a/configure.ac
10+++ b/configure.ac
11@@ -272,6 +272,9 @@ case "$host_os" in
12 *-android*)
13 android=yes
14 ;;
15+*haiku)
16+ haiku=yes
17+ ;;
18 linux*|*-gnu*|gnu*|cygwin*)
19 DEFINES="$DEFINES -D_GNU_SOURCE"
20 ;;
21@@ -281,6 +284,7 @@ solaris*)
22 esac
23
24 AM_CONDITIONAL(HAVE_ANDROID, test "x$android" = xyes)
25+AM_CONDITIONAL(HAVE_HAIKU, test "x$haiku" = xyes)
26
27 dnl Add flags for gcc and g++
28 if test "x$GCC" = xyes; then
29@@ -841,12 +845,18 @@ dnl According to the manual when using pthreads, one should add -pthread to
30 dnl both compile and link-time arguments.
31 dnl In practise that should be sufficient for all platforms, since any
32 dnl platforms build with GCC and Clang support the flag.
33-PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
34+case "$host_os" in
35+haiku*)
36+ ;;
37+* )
38+ PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
39+ ;;
40+esac
41
42 dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
43 dnl project. Even then there's a notable issue as described in the project README
44 case "$host_os" in
45-linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu*)
46+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | haiku*)
47 pthread_stubs_possible="no"
48 ;;
49 * )
50@@ -1490,11 +1500,21 @@ require_dri_shared_libs_and_glapi() {
51 if test "x$enable_dri" != xyes; then
52 # There is only a single backend which won't be build/used otherwise.
53 # XXX: Revisit this as the egl/haiku is a thing.
54- AC_MSG_ERROR([$1 requires --enable-dri])
55+ case "$host_os" in
56+ haiku*)
57+ ;;
58+ *)
59+ AC_MSG_ERROR([$1 requires --enable-dri]) ;;
60+ esac
61 fi
62
63 if test "x$enable_shared_glapi" != xyes; then
64- AC_MSG_ERROR([$1 requires --enable-shared-glapi])
65+ case "$host_os" in
66+ haiku*)
67+ ;;
68+ *)
69+ AC_MSG_ERROR([$1 requires --enable-shared-glapi]) ;;
70+ esac
71 fi
72 }
73
74@@ -1710,6 +1730,10 @@ for plat in $platforms; do
75 DEFINES="$DEFINES -DHAVE_ANDROID_PLATFORM"
76 ;;
77
78+ haiku)
79+ DEFINES="$DEFINES -DHAVE_HAIKU_PLATFORM"
80+ ;;
81+
82 *)
83 AC_MSG_ERROR([platform '$plat' does not exist])
84 ;;
85@@ -2769,6 +2793,7 @@ AC_CONFIG_FILES([Makefile
86 src/gallium/state_trackers/clover/Makefile
87 src/gallium/state_trackers/dri/Makefile
88 src/gallium/state_trackers/glx/xlib/Makefile
89+ src/gallium/state_trackers/hgl/Makefile
90 src/gallium/state_trackers/nine/Makefile
91 src/gallium/state_trackers/omx/Makefile
92 src/gallium/state_trackers/osmesa/Makefile
93@@ -2779,6 +2804,7 @@ AC_CONFIG_FILES([Makefile
94 src/gallium/targets/d3dadapter9/Makefile
95 src/gallium/targets/d3dadapter9/d3d.pc
96 src/gallium/targets/dri/Makefile
97+ src/gallium/targets/haiku-softpipe/Makefile
98 src/gallium/targets/libgl-xlib/Makefile
99 src/gallium/targets/omx/Makefile
100 src/gallium/targets/opencl/Makefile
101@@ -2802,6 +2828,7 @@ AC_CONFIG_FILES([Makefile
102 src/gallium/winsys/amdgpu/drm/Makefile
103 src/gallium/winsys/svga/drm/Makefile
104 src/gallium/winsys/sw/dri/Makefile
105+ src/gallium/winsys/sw/hgl/Makefile
106 src/gallium/winsys/sw/kms-dri/Makefile
107 src/gallium/winsys/sw/null/Makefile
108 src/gallium/winsys/sw/wrapper/Makefile
109@@ -2817,6 +2844,8 @@ AC_CONFIG_FILES([Makefile
110 src/glx/windows/Makefile
111 src/glx/windows/windowsdriproto.pc
112 src/gtest/Makefile
113+ src/hgl/Makefile
114+ src/hgl/gl.pc
115 src/intel/Makefile
116 src/loader/Makefile
117 src/mapi/Makefile
118diff --git a/src/Makefile.am b/src/Makefile.am
119index aa5f8aa..91439df 100644
120--- a/src/Makefile.am
121+++ b/src/Makefile.am
122@@ -113,6 +113,10 @@ if HAVE_PLATFORM_WAYLAND
123 SUBDIRS += egl/wayland/wayland-egl
124 endif
125
126+if HAVE_HAIKU
127+SUBDIRS += hgl
128+endif
129+
130 if HAVE_EGL
131 SUBDIRS += egl
132 endif
133diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
134index 8109038..07c2a16 100644
135--- a/src/egl/Makefile.am
136+++ b/src/egl/Makefile.am
137@@ -45,6 +45,7 @@ libEGL_common_la_LIBADD = \
138
139 dri2_backend_FILES =
140 dri3_backend_FILES =
141+haiku_backend_FILES =
142
143 if HAVE_PLATFORM_X11
144 AM_CFLAGS += $(XCB_DRI2_CFLAGS)
145@@ -83,6 +84,22 @@ libEGL_common_la_LIBADD += $(ANDROID_LIBS)
146 dri2_backend_FILES += drivers/dri2/platform_android.c
147 endif
148
149+if HAVE_HAIKU
150+AM_CPPFLAGS = \
151+ -I$(top_srcdir)/include \
152+ -I$(top_srcdir)/include/HaikuGL \
153+ -I$(top_srcdir)/src/egl/main \
154+ -I$(top_srcdir)/src/ \
155+ -D_EGL_BUILT_IN_DRIVER_HAIKU \
156+ -D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM)
157+haiku_backend_FILES += drivers/haiku/egl_haiku.cpp
158+libEGL_common_la_LIBADD += $(top_builddir)/src/hgl/libGL.la
159+libEGL_common_la_SOURCES += \
160+ $(haiku_backend_FILES)
161+
162+endif
163+
164+if !HAVE_HAIKU
165 AM_CFLAGS += \
166 -I$(top_srcdir)/src/loader \
167 -I$(top_srcdir)/src/egl/drivers/dri2 \
168@@ -121,6 +138,8 @@ g_egldispatchstubs.h: $(GLVND_GEN_DEPS)
169 BUILT_SOURCES = g_egldispatchstubs.c g_egldispatchstubs.h
170 CLEANFILES = $(BUILT_SOURCES)
171
172+endif
173+
174 if USE_LIBGLVND
175 AM_CFLAGS += \
176 $(GLVND_CFLAGS)
177@@ -177,7 +196,6 @@ TESTS = egl-symbols-check \
178 EXTRA_DIST = \
179 $(TESTS) \
180 SConscript \
181- drivers/haiku \
182 main/egl.def \
183 main/README.txt \
184 $(GLVND_GEN_DEPS) \
185diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am
186index 38da63b..49b457d 100644
187--- a/src/gallium/Makefile.am
188+++ b/src/gallium/Makefile.am
189@@ -110,6 +110,10 @@ if HAVE_DRISW_KMS
190 SUBDIRS += winsys/sw/kms-dri
191 endif
192
193+if HAVE_HAIKU
194+SUBDIRS += winsys/sw/hgl
195+endif
196+
197 SUBDIRS += winsys/sw/wrapper
198
199 ##
200@@ -173,6 +177,10 @@ if HAVE_ST_NINE
201 SUBDIRS += state_trackers/nine targets/d3dadapter9
202 endif
203
204+if HAVE_HAIKU
205+SUBDIRS += state_trackers/hgl targets/haiku-softpipe
206+endif
207+
208 ##
209 ## Don't forget to bundle the remaining (non autotools) state-trackers/targets
210 ##
211@@ -182,7 +190,6 @@ EXTRA_DIST += \
212 state_trackers/README \
213 state_trackers/wgl targets/libgl-gdi \
214 targets/graw-gdi targets/graw-null targets/graw-xlib \
215- state_trackers/hgl targets/haiku-softpipe \
216 tools
217
218
219diff --git a/src/gallium/state_trackers/hgl/Makefile.am b/src/gallium/state_trackers/hgl/Makefile.am
220new file mode 100644
221index 0000000..5b55be8
222--- /dev/null
223+++ b/src/gallium/state_trackers/hgl/Makefile.am
224@@ -0,0 +1,39 @@
225+# Copyright © 2017 Haiku, Inc. All rights reserved.
226+#
227+# Permission is hereby granted, free of charge, to any person obtaining a
228+# copy of this software and associated documentation files (the "Software"),
229+# to deal in the Software without restriction, including without limitation
230+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
231+# and/or sell copies of the Software, and to permit persons to whom the
232+# Software is furnished to do so, subject to the following conditions:
233+#
234+# The above copyright notice and this permission notice (including the next
235+# paragraph) shall be included in all copies or substantial portions of the
236+# Software.
237+#
238+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
239+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
240+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
241+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
242+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
243+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
244+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
245+# DEALINGS IN THE SOFTWARE.
246+
247+include Makefile.sources
248+include $(top_srcdir)/src/gallium/Automake.inc
249+
250+
251+AM_CPPFLAGS = \
252+ -I$(top_srcdir)/src \
253+ -I$(top_srcdir)/src/mapi \
254+ -I$(top_srcdir)/src/mesa \
255+ -I$(top_srcdir)/include/HaikuGL \
256+ $(GALLIUM_CFLAGS)
257+
258+noinst_LTLIBRARIES = libhgl.la
259+libhgl_la_LIBADD = -ltranslation
260+libhgl_la_SOURCES = $(common_SOURCES)
261+
262+
263+EXTRA_DIST = SConscript
264diff --git a/src/gallium/state_trackers/hgl/Makefile.sources b/src/gallium/state_trackers/hgl/Makefile.sources
265new file mode 100644
266index 0000000..3076ba3
267--- /dev/null
268+++ b/src/gallium/state_trackers/hgl/Makefile.sources
269@@ -0,0 +1,3 @@
270+common_SOURCES := \
271+ hgl.c \
272+ bitmap_wrapper.cpp
273diff --git a/src/gallium/targets/haiku-softpipe/Makefile.am b/src/gallium/targets/haiku-softpipe/Makefile.am
274new file mode 100644
275index 0000000..94599a3
276--- /dev/null
277+++ b/src/gallium/targets/haiku-softpipe/Makefile.am
278@@ -0,0 +1,69 @@
279+include $(top_srcdir)/src/gallium/Automake.inc
280+
281+AM_CPPFLAGS = \
282+ -I$(top_srcdir)/src/mapi \
283+ -I$(top_srcdir)/src/mesa \
284+ -I$(top_srcdir)/src/mesa/main \
285+ -I$(top_srcdir)/include/HaikuGL \
286+ -I$(top_srcdir)/src/gallium/include \
287+ -I$(top_srcdir)/src/gallium/winsys \
288+ -I$(top_srcdir)/src/gallium/state_trackers/hgl \
289+ -I/boot/system/develop/headers/private \
290+ $(GALLIUM_TARGET_CFLAGS) \
291+ $(DEFINES) \
292+ -DGALLIUM_SOFTPIPE \
293+ -DGALLIUM_RBUG \
294+ -DGALLIUM_TRACE
295+
296+hswpipedir = ${libdir}/haiku
297+hswpipe_LTLIBRARIES = libswpipe.la
298+
299+libswpipe_la_SOURCES = \
300+ GalliumContext.cpp \
301+ SoftwareRenderer.cpp
302+
303+libswpipe_la_LDFLAGS = \
304+ -shared \
305+ -shrext .so \
306+ -module \
307+ -avoid-version \
308+ $(GC_SECTIONS)
309+
310+libswpipe_la_LIBADD = \
311+ $(top_builddir)/src/hgl/libGL.la \
312+ $(top_builddir)/src/gallium/winsys/sw/hgl/libswhgl.la \
313+ $(top_builddir)/src/gallium/state_trackers/hgl/libhgl.la \
314+ $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
315+ $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
316+ $(top_builddir)/src/gallium/auxiliary/libgallium.la \
317+ $(top_builddir)/src/mesa/libmesagallium.la \
318+ $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
319+ $(GALLIUM_COMMON_LIB_DEPS) \
320+ -lnetwork
321+
322+EXTRA_DIST = \
323+ SConscript
324+
325+TARGET_DRIVERS =
326+TARGET_CPPFLAGS =
327+TARGET_LIB_DEPS =
328+
329+include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
330+include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
331+include $(top_srcdir)/src/gallium/drivers/swr/Automake.inc
332+
333+
334+if HAVE_GALLIUM_LLVM
335+AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
336+
337+libswpipe_la_LIBADD += $(LLVM_LIBS) \
338+ $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
339+libswpipe_la_LDFLAGS += $(LLVM_LDFLAGS)
340+endif
341+
342+if HAVE_GALLIUM_SWR
343+AM_CPPFLAGS += -DGALLIUM_SWR
344+
345+libswpipe_la_LIBADD += \
346+ $(top_builddir)/src/gallium/drivers/swr/libmesaswr.la
347+endif
348diff --git a/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp b/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
349index 18cb1ac..4e4888a 100644
350--- a/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
351+++ b/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
352@@ -33,6 +33,8 @@
353
354 extern const char* color_space_name(color_space space);
355
356+#undef _EXPORT
357+#define _EXPORT __attribute__((__visibility__("default")))
358
359 extern "C" _EXPORT BGLRenderer*
360 instantiate_gl_renderer(BGLView *view, ulong opts, BGLDispatcher *dispatcher)
361diff --git a/src/gallium/winsys/sw/hgl/Makefile.am b/src/gallium/winsys/sw/hgl/Makefile.am
362new file mode 100644
363index 0000000..8e5d403
364--- /dev/null
365+++ b/src/gallium/winsys/sw/hgl/Makefile.am
366@@ -0,0 +1,34 @@
367+# Copyright © 2017 Haiku, Inc. All rights reserved.
368+#
369+# Permission is hereby granted, free of charge, to any person obtaining a
370+# copy of this software and associated documentation files (the "Software"),
371+# to deal in the Software without restriction, including without limitation
372+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
373+# and/or sell copies of the Software, and to permit persons to whom the
374+# Software is furnished to do so, subject to the following conditions:
375+#
376+# The above copyright notice and this permission notice (including the next
377+# paragraph) shall be included in all copies or substantial portions of the
378+# Software.
379+#
380+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
381+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
382+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
383+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
384+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
385+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
386+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
387+# DEALINGS IN THE SOFTWARE.
388+
389+include Makefile.sources
390+include $(top_srcdir)/src/gallium/Automake.inc
391+
392+AM_CFLAGS = \
393+ -I$(top_srcdir)/src/gallium/state_trackers/hgl \
394+ $(GALLIUM_WINSYS_CFLAGS)
395+
396+noinst_LTLIBRARIES = libswhgl.la
397+
398+libswhgl_la_SOURCES = $(C_SOURCES)
399+
400+EXTRA_DIST = SConscript
401diff --git a/src/gallium/winsys/sw/hgl/Makefile.sources b/src/gallium/winsys/sw/hgl/Makefile.sources
402new file mode 100644
403index 0000000..52bfc88
404--- /dev/null
405+++ b/src/gallium/winsys/sw/hgl/Makefile.sources
406@@ -0,0 +1,3 @@
407+C_SOURCES := \
408+ hgl_sw_winsys.c \
409+ hgl_sw_winsys.h
410diff --git a/src/hgl/Makefile.am b/src/hgl/Makefile.am
411new file mode 100644
412index 0000000..f82602a
413--- /dev/null
414+++ b/src/hgl/Makefile.am
415@@ -0,0 +1,50 @@
416+# Copyright © 2017 Haiku, Inc. All rights reserved.
417+#
418+# Permission is hereby granted, free of charge, to any person obtaining a
419+# copy of this software and associated documentation files (the "Software"),
420+# to deal in the Software without restriction, including without limitation
421+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
422+# and/or sell copies of the Software, and to permit persons to whom the
423+# Software is furnished to do so, subject to the following conditions:
424+#
425+# The above copyright notice and this permission notice (including the next
426+# paragraph) shall be included in all copies or substantial portions of the
427+# Software.
428+#
429+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
430+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
431+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
432+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
433+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
434+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
435+# IN THE SOFTWARE.
436+
437+include Makefile.sources
438+
439+AM_CPPFLAGS = \
440+ -I$(top_srcdir)/src \
441+ -I$(top_srcdir)/src/mapi \
442+ -I$(top_srcdir)/src/mesa \
443+ -I$(top_srcdir)/src/mesa/main \
444+ -I$(top_srcdir)/include/ \
445+ -I$(top_srcdir)/include/HaikuGL \
446+ -I/system/develop/headers/private \
447+ -I$(top_builddir)/src/mapi \
448+ $(DEFINES)
449+
450+
451+lib_LTLIBRARIES = libGL.la
452+
453+libGL_la_LIBADD = $(top_builddir)/src/mapi/glapi/libglapi.la -lbe
454+libGL_la_SOURCES = $(COMMON_SOURCES)
455+libGL_la_LDFLAGS = \
456+ -no-undefined \
457+ -version-number 1:0 \
458+ $(BSYMBOLIC) \
459+ $(GC_SECTIONS) \
460+ $(LD_NO_UNDEFINED)
461+
462+pkgconfigdir = $(libdir)/pkgconfig
463+pkgconfig_DATA = gl.pc
464+
465+EXTRA_DIST =
466diff --git a/src/hgl/Makefile.sources b/src/hgl/Makefile.sources
467new file mode 100644
468index 0000000..5df230b
469--- /dev/null
470+++ b/src/hgl/Makefile.sources
471@@ -0,0 +1,8 @@
472+COMMON_SOURCES := \
473+ GLView.cpp \
474+ GLRenderer.cpp \
475+ GLRendererRoster.cpp \
476+ GLRendererRoster.h \
477+ GLDispatcher.cpp \
478+ GLDispatcher.h
479+
480diff --git a/src/hgl/gl.pc.in b/src/hgl/gl.pc.in
481new file mode 100644
482index 0000000..7577bae
483--- /dev/null
484+++ b/src/hgl/gl.pc.in
485@@ -0,0 +1,11 @@
486+prefix=@prefix@
487+exec_prefix=${prefix}
488+libdir=@libdir@
489+includedir=@includedir@
490+
491+Name: gl
492+Description: Mesa OpenGL library
493+Version: @PACKAGE_VERSION@
494+Libs: -L${libdir} -lGL
495+Libs.private: @GL_PC_LIB_PRIV@
496+Cflags: -I${includedir} @GL_PC_CFLAGS@
497diff --git a/src/mapi/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c
498index df907ff..9f21a71 100644
499--- a/src/mapi/glapi/glapi_dispatch.c
500+++ b/src/mapi/glapi/glapi_dispatch.c
501@@ -144,6 +144,9 @@ GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLf
502 GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
503 GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
504
505+GL_API void GL_APIENTRY glBlendBarrier (void);
506+GL_API void GL_APIENTRY glPrimitiveBoundingBox (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
507+
508 /* Enable frame pointer elimination on Windows, otherwise forgetting to add
509 * APIENTRY to _mesa_* entrypoints will not cause crashes on debug builds, as
510 * the initial ESP value is saved in the EBP in the function prologue, then
511--
5122.14.2
513
514
515From 639a31f891f1a419d876004930fe1560440e3d23 Mon Sep 17 00:00:00 2001
516From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
517Date: Wed, 10 May 2017 17:26:07 +0900
518Subject: gallivm: Fix build against LLVM SVN >= r302589
519MIME-Version: 1.0
520Content-Type: text/plain; charset=UTF-8
521Content-Transfer-Encoding: 8bit
522
523deregisterEHFrames doesn't take any parameters anymore.
524
525Reviewed-by: Vedran Miletić <vedran@miletic.net>
526Reviewed-by: Marek Olšák <marek.olsak@amd.com>
527
528diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
529index 2a388cb..0e4a531 100644
530--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
531+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
532@@ -342,13 +342,19 @@ class DelegatingJITMemoryManager : public BaseMemoryManager {
533 virtual void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
534 mgr()->registerEHFrames(Addr, LoadAddr, Size);
535 }
536- virtual void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
537- mgr()->deregisterEHFrames(Addr, LoadAddr, Size);
538- }
539 #else
540 virtual void registerEHFrames(llvm::StringRef SectionData) {
541 mgr()->registerEHFrames(SectionData);
542 }
543+#endif
544+#if HAVE_LLVM >= 0x0500
545+ virtual void deregisterEHFrames() {
546+ mgr()->deregisterEHFrames();
547+ }
548+#elif HAVE_LLVM >= 0x0304
549+ virtual void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
550+ mgr()->deregisterEHFrames(Addr, LoadAddr, Size);
551+ }
552 #endif
553 virtual void *getPointerToNamedFunction(const std::string &Name,
554 bool AbortOnFailure=true) {
555--
5562.14.2