[packages/Mesa] fix omx st build with gcc 10; rel 2
atler
atler at pld-linux.org
Wed May 20 12:09:11 CEST 2020
commit 1afde4c028e4c0664f2e04d90c904b3d3056cc7d
Author: Jan Palus <atler at pld-linux.org>
Date: Wed May 20 12:08:46 2020 +0200
fix omx st build with gcc 10; rel 2
Mesa.spec | 4 +++-
gcc10.patch | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 1 deletion(-)
---
diff --git a/Mesa.spec b/Mesa.spec
index 2abb142..c36db4b 100644
--- a/Mesa.spec
+++ b/Mesa.spec
@@ -70,7 +70,7 @@ Summary: Free OpenGL implementation
Summary(pl.UTF-8): Wolnodostępna implementacja standardu OpenGL
Name: Mesa
Version: 20.0.7
-Release: 1
+Release: 2
License: MIT (core) and others - see license.html file
Group: X11/Libraries
#Source0: ftp://ftp.freedesktop.org/pub/mesa/mesa-%{version}.tar.xz
@@ -80,6 +80,7 @@ Source0: https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-%{version}/mesa
Patch0: nouveau_no_rtti.patch
Patch1: i9x5-tex-ignore-the-diff-between-GL_TEXTURE_2D-and-GL_TEXTURE_RECTANGLE.patch
Patch2: llvm10.patch
+Patch3: gcc10.patch
URL: http://www.mesa3d.org/
%{?with_opencl_spirv:BuildRequires: SPIRV-LLVM-Translator-devel >= 0.2.1}
%{?with_gallium_zink:BuildRequires: Vulkan-Loader-devel}
@@ -1367,6 +1368,7 @@ radv - eksperymentalny sterownik Vulkan dla GPU firmy AMD.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%if %{with opencl}
diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644
index 0000000..cb1a8f5
--- /dev/null
+++ b/gcc10.patch
@@ -0,0 +1,74 @@
+From 283e815339a15fa99039c69f1e225269790ae955 Mon Sep 17 00:00:00 2001
+From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
+Date: Thu, 5 Mar 2020 09:37:58 +0100
+Subject: [PATCH 1/2] omx: fix build with gcc 10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+bellagio/omx header files reference a global variable without the
+extern keyworkd.
+Now that gcc-10 enables the '-fno-common' by default the build fails.
+Since these are external headers we can't easily fix them, so for
+now build the omx module with the '-fcommon' flag to keep the
+previous behavior.
+
+See https://gitlab.freedesktop.org/mesa/mesa/issues/2385
+
+Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4058>
+---
+ src/gallium/state_trackers/omx/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/state_trackers/omx/meson.build b/src/gallium/state_trackers/omx/meson.build
+index 3aa82090c91..987d3e23c84 100644
+--- a/src/gallium/state_trackers/omx/meson.build
++++ b/src/gallium/state_trackers/omx/meson.build
+@@ -65,7 +65,7 @@ endif
+ libomx_st = static_library(
+ 'omx_st',
+ files_omx,
+- c_args : [c_vis_args],
++ c_args : [c_vis_args, '-fcommon'],
+ include_directories : inc_st_omx,
+ dependencies : dep_st_omx,
+ )
+--
+2.26.2
+
+
+From 33b255e107b470b8d2ea5bd96d82c613244aaf47 Mon Sep 17 00:00:00 2001
+From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
+Date: Thu, 5 Mar 2020 11:00:28 +0100
+Subject: [PATCH 2/2] meson: enable -fno-common by default
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This flag is enabled by default starting with gcc 10.
+All the compilation issues have been fixed, so use it by default
+to make sure we're not introducing regressions.
+
+Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>
+Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4058>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4058>
+---
+ meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/meson.build b/meson.build
+index 1484e7fec5d..bf306605645 100644
+--- a/meson.build
++++ b/meson.build
+@@ -958,6 +958,7 @@ else
+ '-fno-math-errno',
+ '-fno-trapping-math',
+ '-Qunused-arguments',
++ '-fno-common',
+ ]
+ # MinGW chokes on format specifiers and I can't get it all working
+ if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
+--
+2.26.2
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/Mesa.git/commitdiff/1afde4c028e4c0664f2e04d90c904b3d3056cc7d
More information about the pld-cvs-commit
mailing list