Merge commit '5e8f8f1e6b80f25dce2ce1763bdd946413c57d4a' into f25

This commit is contained in:
Hans de Goede 2017-01-23 13:08:11 +01:00
commit ab7cedf46f
5 changed files with 4009 additions and 22 deletions

View file

@ -0,0 +1,26 @@
From 1b5a187c3c31513ae39cd2a917a3234c2c5f87fc Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 12 Oct 2016 13:41:33 -0400
Subject: [PATCH] Fix linkage against shared glapi
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
src/gallium/targets/osmesa/Makefile.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am
index 5d39486..04add87 100644
--- a/src/gallium/targets/osmesa/Makefile.am
+++ b/src/gallium/targets/osmesa/Makefile.am
@@ -63,7 +63,7 @@ lib@OSMESA_LIB@_la_LIBADD = \
$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
$(top_builddir)/src/gallium/state_trackers/osmesa/libosmesa.la \
- $(top_builddir)/src/mapi/glapi/libglapi.la \
+ $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
$(SHARED_GLAPI_LIB) \
$(OSMESA_LIB_DEPS) \
$(CLOCK_LIB)
--
2.9.3

3855
0001-egl-glvnd-support.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,82 @@
From 16875ea5b9170f2213fd486d763f27a9d6dfc1b5 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Tue, 25 Oct 2016 09:35:13 +0200
Subject: [PATCH 1/3] glapi: Link with glapi when built shared
This patch explicitly links to libglapi when built shared.
This was specially needed to avoid undefined non-weak-symbol as shown
with:
ldd -r /usr/lib64/dri/i915_dri.so
linux-vdso.so.1 (0x00007fff821f4000)
libdrm_intel.so.1 => /lib64/libdrm_intel.so.1 (0x00007f6adf2c7000)
libdrm_nouveau.so.2 => /lib64/libdrm_nouveau.so.2 (0x00007f6adf0be000)
libdrm_radeon.so.1 => /lib64/libdrm_radeon.so.1 (0x00007f6adeeb2000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f6adec8b000)
libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f6adea7c000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f6ade84f000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6ade633000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f6ade42f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6ade125000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6addf0e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6addb4c000)
/lib64/ld-linux-x86-64.so.2 (0x000056274e913000)
libpciaccess.so.0 => /lib64/libpciaccess.so.0 (0x00007f6add941000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f6add6ce000)
undefined symbol: _glapi_get_dispatch_table_size (/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_get_context (/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_add_dispatch (/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_check_multithread (/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_tls_Context (/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_set_context (/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_set_dispatch (/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_tls_Dispatch (/usr/lib64/dri/i915_dri.so)
v3: Add gallium counterpart for radeon cases
Reported-by: Jonathan Dieter <jdieter@lesbg.com>
v2: Add Bugzilla and Signed-off
Fixes: 0cbc90c57c ("mesa: dri: Add shared glapi to LIBADD on Android")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98428
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
src/gallium/targets/dri/Makefile.am | 2 --
src/mesa/drivers/dri/Makefile.am | 3 ---
2 files changed, 5 deletions(-)
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index bca747f..05f6c8c 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -1,10 +1,8 @@
include $(top_srcdir)/src/gallium/Automake.inc
-if HAVE_ANDROID
if HAVE_SHARED_GLAPI
SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
endif
-endif
AM_CFLAGS = \
-I$(top_srcdir)/src/mapi \
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 1c6dd08..8e68fc0 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -6,12 +6,9 @@ MEGADRIVERS_DEPS =
SUBDIRS+=common
-# On Android, we need to explicitly link to libglapi.so.
-if HAVE_ANDROID
if HAVE_SHARED_GLAPI
SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
endif
-endif
if HAVE_I915_DRI
SUBDIRS += i915
--
2.7.4

12
glvnd-fix-gl-dot-pc.patch Normal file
View file

@ -0,0 +1,12 @@
diff -up mesa-12.0.3/src/mesa/gl.pc.in.jx mesa-12.0.3/src/mesa/gl.pc.in
--- mesa-12.0.3/src/mesa/gl.pc.in.jx 2016-01-18 02:39:26.000000000 -0500
+++ mesa-12.0.3/src/mesa/gl.pc.in 2016-10-25 13:06:44.013159358 -0400
@@ -7,7 +7,7 @@ Name: gl
Description: Mesa OpenGL library
Requires.private: @GL_PC_REQ_PRIV@
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -l@GL_LIB@
+Libs: -L${libdir} -lGL
Libs.private: @GL_PC_LIB_PRIV@
Cflags: -I${includedir} @GL_PC_CFLAGS@
glx_tls: @GLX_TLS@

View file

@ -59,7 +59,7 @@
Name: mesa Name: mesa
Summary: Mesa graphics libraries Summary: Mesa graphics libraries
Version: 13.0.3 Version: 13.0.3
Release: 1%{?rctag:.%{rctag}}%{?dist} Release: 3%{?rctag:.%{rctag}}%{?dist}
License: MIT License: MIT
URL: http://www.mesa3d.org URL: http://www.mesa3d.org
@ -78,6 +78,12 @@ Patch2: 0002-hardware-gloat.patch
Patch3: 0003-evergreen-big-endian.patch Patch3: 0003-evergreen-big-endian.patch
Patch4: 0004-bigendian-assert.patch Patch4: 0004-bigendian-assert.patch
# glvnd support patches
Patch11: 0001-egl-glvnd-support.patch
Patch12: glvnd-fix-gl-dot-pc.patch
Patch13: 0001-Fix-linkage-against-shared-glapi.patch
Patch14: 0001-glapi-Link-with-glapi-when-built-shared.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: automake BuildRequires: automake
@ -110,6 +116,7 @@ BuildRequires: clang-devel >= 3.0
%endif %endif
BuildRequires: elfutils-libelf-devel BuildRequires: elfutils-libelf-devel
BuildRequires: libxml2-python BuildRequires: libxml2-python
BuildRequires: libudev-devel
BuildRequires: bison flex BuildRequires: bison flex
%if %{with wayland} %if %{with wayland}
BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-client)
@ -134,6 +141,10 @@ BuildRequires: nettle-devel
%endif %endif
BuildRequires: python-mako BuildRequires: python-mako
BuildRequires: libstdc++-static BuildRequires: libstdc++-static
%ifarch %{valgrind_arches}
BuildRequires: pkgconfig(valgrind)
%endif
BuildRequires: libglvnd-core-devel
%description %description
%{summary}. %{summary}.
@ -149,8 +160,7 @@ Obsoletes: mesa-dri-filesystem < %{?epoch:%{epoch}}%{version}-%{release}
%package libGL %package libGL
Summary: Mesa libGL runtime libraries Summary: Mesa libGL runtime libraries
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release} Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Provides: libGL Requires: libglvnd-glx%{?_isa}
Provides: libGL%{?_isa}
%description libGL %description libGL
%{summary}. %{summary}.
@ -158,6 +168,7 @@ Provides: libGL%{?_isa}
%package libGL-devel %package libGL-devel
Summary: Mesa libGL development package Summary: Mesa libGL development package
Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release} Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Provides: libGL-devel Provides: libGL-devel
Provides: libGL-devel%{?_isa} Provides: libGL-devel%{?_isa}
@ -166,8 +177,7 @@ Provides: libGL-devel%{?_isa}
%package libEGL %package libEGL
Summary: Mesa libEGL runtime libraries Summary: Mesa libEGL runtime libraries
Provides: libEGL Requires: libglvnd-egl%{?_isa}
Provides: libEGL%{?_isa}
%description libEGL %description libEGL
%{summary}. %{summary}.
@ -175,6 +185,7 @@ Provides: libEGL%{?_isa}
%package libEGL-devel %package libEGL-devel
Summary: Mesa libEGL development package Summary: Mesa libEGL development package
Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release} Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Provides: libEGL-devel Provides: libEGL-devel
Provides: libEGL-devel%{?_isa} Provides: libEGL-devel%{?_isa}
@ -184,8 +195,7 @@ Provides: libEGL-devel%{?_isa}
%package libGLES %package libGLES
Summary: Mesa libGLES runtime libraries Summary: Mesa libGLES runtime libraries
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release} Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Provides: libGLES Requires: libglvnd-gles%{?_isa}
Provides: libGLES%{?_isa}
%description libGLES %description libGLES
%{summary}. %{summary}.
@ -193,6 +203,7 @@ Provides: libGLES%{?_isa}
%package libGLES-devel %package libGLES-devel
Summary: Mesa libGLES development package Summary: Mesa libGLES development package
Requires: %{name}-libGLES%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release} Requires: %{name}-libGLES%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Provides: libGLES-devel Provides: libGLES-devel
Provides: libGLES-devel%{?_isa} Provides: libGLES-devel%{?_isa}
@ -380,6 +391,7 @@ export LDFLAGS="-static-libstdc++"
%configure \ %configure \
%{?asm_flags} \ %{?asm_flags} \
--enable-libglvnd \
--enable-selinux \ --enable-selinux \
--enable-gallium-osmesa \ --enable-gallium-osmesa \
--with-dri-driverdir=%{_libdir}/dri \ --with-dri-driverdir=%{_libdir}/dri \
@ -433,6 +445,11 @@ rm -f %{buildroot}%{_sysconfdir}/drirc
# libvdpau opens the versioned name, don't bother including the unversioned # libvdpau opens the versioned name, don't bother including the unversioned
rm -f %{buildroot}%{_libdir}/vdpau/*.so rm -f %{buildroot}%{_libdir}/vdpau/*.so
# likewise glvnd
rm -f %{buildroot}%{_libdir}/libGLX_mesa.so
rm -f %{buildroot}%{_libdir}/libEGL_mesa.so
# XXX can we just not build this
rm -f %{buildroot}%{_libdir}/libGLES*
# strip out useless headers # strip out useless headers
rm -f %{buildroot}%{_includedir}/GL/w*.h rm -f %{buildroot}%{_includedir}/GL/w*.h
@ -462,11 +479,8 @@ popd
%endif %endif
%endif %endif
%post libGL -p /sbin/ldconfig
%postun libGL -p /sbin/ldconfig
%files libGL %files libGL
%{_libdir}/libGL.so.1 %{_libdir}/libGLX_mesa.so.0*
%{_libdir}/libGL.so.1.*
%files libGL-devel %files libGL-devel
%{_includedir}/GL/gl.h %{_includedir}/GL/gl.h
%{_includedir}/GL/gl_mangle.h %{_includedir}/GL/gl_mangle.h
@ -479,15 +493,12 @@ popd
%{_includedir}/GL/internal/dri_interface.h %{_includedir}/GL/internal/dri_interface.h
%{_includedir}/GL/mesa_glinterop.h %{_includedir}/GL/mesa_glinterop.h
%{_libdir}/pkgconfig/dri.pc %{_libdir}/pkgconfig/dri.pc
%{_libdir}/libGL.so
%{_libdir}/libglapi.so %{_libdir}/libglapi.so
%{_libdir}/pkgconfig/gl.pc %{_libdir}/pkgconfig/gl.pc
%post libEGL -p /sbin/ldconfig
%postun libEGL -p /sbin/ldconfig
%files libEGL %files libEGL
%{_libdir}/libEGL.so.1 %{_datadir}/glvnd/egl_vendor.d/50_mesa.json
%{_libdir}/libEGL.so.1.* %{_libdir}/libEGL_mesa.so.0*
%files libEGL-devel %files libEGL-devel
%dir %{_includedir}/EGL %dir %{_includedir}/EGL
%{_includedir}/EGL/eglext.h %{_includedir}/EGL/eglext.h
@ -498,13 +509,9 @@ popd
%dir %{_includedir}/KHR %dir %{_includedir}/KHR
%{_includedir}/KHR/khrplatform.h %{_includedir}/KHR/khrplatform.h
%{_libdir}/pkgconfig/egl.pc %{_libdir}/pkgconfig/egl.pc
%{_libdir}/libEGL.so
%post libGLES -p /sbin/ldconfig
%postun libGLES -p /sbin/ldconfig
%files libGLES %files libGLES
%{_libdir}/libGLESv2.so.2 # No files, all provided by libglvnd
%{_libdir}/libGLESv2.so.2.*
%files libGLES-devel %files libGLES-devel
%dir %{_includedir}/GLES2 %dir %{_includedir}/GLES2
%{_includedir}/GLES2/gl2platform.h %{_includedir}/GLES2/gl2platform.h
@ -517,7 +524,6 @@ popd
%{_includedir}/GLES3/gl31.h %{_includedir}/GLES3/gl31.h
%{_includedir}/GLES3/gl32.h %{_includedir}/GLES3/gl32.h
%{_libdir}/pkgconfig/glesv2.pc %{_libdir}/pkgconfig/glesv2.pc
%{_libdir}/libGLESv2.so
%post libglapi -p /sbin/ldconfig %post libglapi -p /sbin/ldconfig
%postun libglapi -p /sbin/ldconfig %postun libglapi -p /sbin/ldconfig
@ -673,6 +679,12 @@ popd
%endif %endif
%changelog %changelog
* Tue Jan 17 2017 Hans de Goede <hdegoede@redhat.com> - 13.0.3-3
- Enable libglvnd support (rhbz#1413579)
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 13.0.3-2
- Add valgrind BuildRequires to have valgrind support
* Fri Jan 6 2017 Peter Robinson <pbrobinson@fedoraproject.org> 13.0.3-1 * Fri Jan 6 2017 Peter Robinson <pbrobinson@fedoraproject.org> 13.0.3-1
- 13.0.3 GA - 13.0.3 GA