From bb54ad62c64b417e63ee339f9c8e16a70e4add9909c1d19a1e4f040440e7950b Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 6 Jan 2022 16:57:28 +0000 Subject: [PATCH 1/4] - n_no-sse2-on-ix86.patch * disabled sse2 support on %ix86 (boo#1190409) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1074 --- Mesa-drivers.spec | 2 +- Mesa.changes | 6 ++++++ Mesa.spec | 6 +++++- n_no-sse2-on-ix86.patch | 30 ++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 n_no-sse2-on-ix86.patch diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index 0993ce7..b1c8061 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -1,7 +1,7 @@ # # spec file for package Mesa-drivers # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/Mesa.changes b/Mesa.changes index 26487e6..6b28748 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 6 16:34:30 UTC 2022 - Stefan Dirsch + +- n_no-sse2-on-ix86.patch + * disabled sse2 support on %ix86 (boo#1190409) + ------------------------------------------------------------------- Fri Dec 31 12:42:24 UTC 2021 - Aaron Stern diff --git a/Mesa.spec b/Mesa.spec index 4282365..b925153 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -1,7 +1,7 @@ # # spec file for package Mesa # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -134,6 +134,7 @@ Patch58: u_dep_xcb.patch Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch Patch200: u_fix-build-on-ppc64le.patch Patch300: n_buildfix-21.3.0.patch +Patch400: n_no-sse2-on-ix86.patch BuildRequires: bison BuildRequires: fdupes BuildRequires: flex @@ -769,6 +770,9 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch100 -p1 %patch200 -p1 %patch300 -p1 +%ifarch %{ix86} +%patch400 -p1 +%endif # Remove requires to vulkan libs from baselibs.conf on platforms # where vulkan build is disabled; ugly ... diff --git a/n_no-sse2-on-ix86.patch b/n_no-sse2-on-ix86.patch new file mode 100644 index 0000000..cb9e2cd --- /dev/null +++ b/n_no-sse2-on-ix86.patch @@ -0,0 +1,30 @@ +--- mesa-21.3.3/meson.build.orig 2022-01-06 17:30:29.318317000 +0100 ++++ mesa-21.3.3/meson.build 2022-01-06 17:31:48.709078000 +0100 +@@ -1237,24 +1237,9 @@ if host_machine.cpu_family().startswith( + sse41_args = ['-msse4.1'] + + if host_machine.cpu_family() == 'x86' +- if get_option('sse2') +- # These settings make generated GCC code match MSVC and follow +- # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note +- # +- # NOTE: We need to ensure stack is realigned given that we +- # produce shared objects, and have no control over the stack +- # alignment policy of the application. Therefore we need +- # -mstackrealign or -mincoming-stack-boundary=2. +- # +- # XXX: We could have SSE without -mstackrealign if we always used +- # __attribute__((force_align_arg_pointer)), but that's not +- # always the case. +- c_args += ['-msse2', '-mfpmath=sse', '-mstackrealign'] +- else +- # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but +- # that's not guaranteed +- sse41_args += '-mstackrealign' +- endif ++ # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but ++ # that's not guaranteed ++ sse41_args += '-mstackrealign' + endif + else + with_sse41 = false From b78f080d59ddfc984b2b65d2fd490074ce64a3fc3fd3fcf6ada252d9a78b4886 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 6 Jan 2022 18:55:19 +0000 Subject: [PATCH 2/4] improved n_no-sse2-on-ix86.patch OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1075 --- n_no-sse2-on-ix86.patch | 70 ++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 11 deletions(-) diff --git a/n_no-sse2-on-ix86.patch b/n_no-sse2-on-ix86.patch index cb9e2cd..843a1ad 100644 --- a/n_no-sse2-on-ix86.patch +++ b/n_no-sse2-on-ix86.patch @@ -1,9 +1,16 @@ ---- mesa-21.3.3/meson.build.orig 2022-01-06 17:30:29.318317000 +0100 -+++ mesa-21.3.3/meson.build 2022-01-06 17:31:48.709078000 +0100 -@@ -1237,24 +1237,9 @@ if host_machine.cpu_family().startswith( - sse41_args = ['-msse4.1'] +diff -u -r mesa-21.3.3.orig/meson.build mesa-21.3.3/meson.build +--- mesa-21.3.3.orig/meson.build 2022-01-06 19:34:26.332485000 +0100 ++++ mesa-21.3.3/meson.build 2022-01-06 19:32:11.286680000 +0100 +@@ -1231,35 +1231,8 @@ + endif + endif - if host_machine.cpu_family() == 'x86' +-if host_machine.cpu_family().startswith('x86') and cc.get_id() != 'msvc' +- pre_args += '-DUSE_SSE41' +- with_sse41 = true +- sse41_args = ['-msse4.1'] +- +- if host_machine.cpu_family() == 'x86' - if get_option('sse2') - # These settings make generated GCC code match MSVC and follow - # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note @@ -22,9 +29,50 @@ - # that's not guaranteed - sse41_args += '-mstackrealign' - endif -+ # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but -+ # that's not guaranteed -+ sse41_args += '-mstackrealign' - endif - else - with_sse41 = false +- endif +-else +- with_sse41 = false +- sse41_args = [] +-endif ++with_sse41 = false ++sse41_args = [] + + # Check for GCC style atomics + dep_atomic = null_dep +diff -u -r mesa-21.3.3.orig/src/intel/isl/meson.build mesa-21.3.3/src/intel/isl/meson.build +--- mesa-21.3.3.orig/src/intel/isl/meson.build 2022-01-06 19:33:10.676509000 +0100 ++++ mesa-21.3.3/src/intel/isl/meson.build 2022-01-06 19:40:58.929557000 +0100 +@@ -99,7 +99,7 @@ + inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, + ], + dependencies : idep_mesautil, +- c_args : [no_override_init_args, '-msse2'], ++ c_args : [no_override_init_args, ], + gnu_symbol_visibility : 'hidden', + extra_files : ['isl_tiled_memcpy.c'] + ) +diff -u -r mesa-21.3.3.orig/src/intel/meson.build mesa-21.3.3/src/intel/meson.build +--- mesa-21.3.3.orig/src/intel/meson.build 2022-01-06 19:33:19.801577000 +0100 ++++ mesa-21.3.3/src/intel/meson.build 2022-01-06 19:46:08.372577000 +0100 +@@ -18,7 +18,7 @@ + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + # SOFTWARE. + +-c_sse2_args = ['-msse2', '-mstackrealign'] ++c_sse2_args = ['-mstackrealign'] + inc_intel = include_directories('.') + + subdir('genxml') +diff -u -r mesa-21.3.3.orig/src/intel/perf/meson.build mesa-21.3.3/src/intel/perf/meson.build +--- mesa-21.3.3.orig/src/intel/perf/meson.build 2022-01-06 19:33:19.957531000 +0100 ++++ mesa-21.3.3/src/intel/perf/meson.build 2022-01-06 19:42:22.666599000 +0100 +@@ -37,7 +37,7 @@ + include_directories : [ + inc_include, inc_src, inc_intel, + ], +- c_args : [no_override_init_args, '-msse2'], +- cpp_args : ['-msse2'], ++ c_args : [no_override_init_args], ++ cpp_args : [], + gnu_symbol_visibility : 'hidden', + ) From bf4320f8a71ed986ea7aafdc0b7719fa2be3353c0af3eac042a32c8790b63d3d Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 6 Jan 2022 23:23:44 +0000 Subject: [PATCH 3/4] update also Mesa-drivers.spec OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1076 --- Mesa-drivers.changes | 8 +++++++- Mesa-drivers.spec | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 96fe31e..6b28748 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,5 +1,11 @@ ------------------------------------------------------------------- -Fri Dec 31 12:37:29 UTC 2021 - Aaron Stern +Thu Jan 6 16:34:30 UTC 2022 - Stefan Dirsch + +- n_no-sse2-on-ix86.patch + * disabled sse2 support on %ix86 (boo#1190409) + +------------------------------------------------------------------- +Fri Dec 31 12:42:24 UTC 2021 - Aaron Stern - update to 21.3.3 * Bug fixes diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index b1c8061..193f6d2 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -135,6 +135,7 @@ Patch58: u_dep_xcb.patch Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch Patch200: u_fix-build-on-ppc64le.patch Patch300: n_buildfix-21.3.0.patch +Patch400: n_no-sse2-on-ix86.patch BuildRequires: bison BuildRequires: fdupes BuildRequires: flex @@ -770,6 +771,9 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch100 -p1 %patch200 -p1 %patch300 -p1 +%ifarch %{ix86} +%patch400 -p1 +%endif # Remove requires to vulkan libs from baselibs.conf on platforms # where vulkan build is disabled; ugly ... From 4ebb36365943dfb5426b16c8ce7093c407827a15d3942a7553f9b9a557bfa1f8 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sat, 8 Jan 2022 10:48:19 +0000 Subject: [PATCH 4/4] - rename n_no-sse2-on-ix86.patch to n_no-sse2-on-ix86-except-for-intel-drivers.patch * no longer disable sse2 support for intel drivers, since this breaks build, which is probably unresolvable (boo1190409) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1077 --- Mesa-drivers.changes | 8 ++ Mesa-drivers.spec | 2 +- Mesa.changes | 8 ++ Mesa.spec | 2 +- ...se2-on-ix86-except-for-intel-drivers.patch | 41 ++++++++++ n_no-sse2-on-ix86.patch | 78 ------------------- 6 files changed, 59 insertions(+), 80 deletions(-) create mode 100644 n_no-sse2-on-ix86-except-for-intel-drivers.patch delete mode 100644 n_no-sse2-on-ix86.patch diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 6b28748..794e0ea 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Jan 8 10:21:21 UTC 2022 - Stefan Dirsch + +- rename n_no-sse2-on-ix86.patch to + n_no-sse2-on-ix86-except-for-intel-drivers.patch + * no longer disable sse2 support for intel drivers, since this + breaks build, which is probably unresolvable (boo1190409) + ------------------------------------------------------------------- Thu Jan 6 16:34:30 UTC 2022 - Stefan Dirsch diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index 193f6d2..75c1497 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -135,7 +135,7 @@ Patch58: u_dep_xcb.patch Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch Patch200: u_fix-build-on-ppc64le.patch Patch300: n_buildfix-21.3.0.patch -Patch400: n_no-sse2-on-ix86.patch +Patch400: n_no-sse2-on-ix86-except-for-intel-drivers.patch BuildRequires: bison BuildRequires: fdupes BuildRequires: flex diff --git a/Mesa.changes b/Mesa.changes index 6b28748..794e0ea 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Jan 8 10:21:21 UTC 2022 - Stefan Dirsch + +- rename n_no-sse2-on-ix86.patch to + n_no-sse2-on-ix86-except-for-intel-drivers.patch + * no longer disable sse2 support for intel drivers, since this + breaks build, which is probably unresolvable (boo1190409) + ------------------------------------------------------------------- Thu Jan 6 16:34:30 UTC 2022 - Stefan Dirsch diff --git a/Mesa.spec b/Mesa.spec index b925153..1fc00fa 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -134,7 +134,7 @@ Patch58: u_dep_xcb.patch Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch Patch200: u_fix-build-on-ppc64le.patch Patch300: n_buildfix-21.3.0.patch -Patch400: n_no-sse2-on-ix86.patch +Patch400: n_no-sse2-on-ix86-except-for-intel-drivers.patch BuildRequires: bison BuildRequires: fdupes BuildRequires: flex diff --git a/n_no-sse2-on-ix86-except-for-intel-drivers.patch b/n_no-sse2-on-ix86-except-for-intel-drivers.patch new file mode 100644 index 0000000..2bc6902 --- /dev/null +++ b/n_no-sse2-on-ix86-except-for-intel-drivers.patch @@ -0,0 +1,41 @@ +diff -u -r mesa-21.3.3.orig/meson.build mesa-21.3.3/meson.build +--- mesa-21.3.3.orig/meson.build 2022-01-06 19:34:26.332485000 +0100 ++++ mesa-21.3.3/meson.build 2022-01-06 19:32:11.286680000 +0100 +@@ -1231,35 +1231,8 @@ + endif + endif + +-if host_machine.cpu_family().startswith('x86') and cc.get_id() != 'msvc' +- pre_args += '-DUSE_SSE41' +- with_sse41 = true +- sse41_args = ['-msse4.1'] +- +- if host_machine.cpu_family() == 'x86' +- if get_option('sse2') +- # These settings make generated GCC code match MSVC and follow +- # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note +- # +- # NOTE: We need to ensure stack is realigned given that we +- # produce shared objects, and have no control over the stack +- # alignment policy of the application. Therefore we need +- # -mstackrealign or -mincoming-stack-boundary=2. +- # +- # XXX: We could have SSE without -mstackrealign if we always used +- # __attribute__((force_align_arg_pointer)), but that's not +- # always the case. +- c_args += ['-msse2', '-mfpmath=sse', '-mstackrealign'] +- else +- # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but +- # that's not guaranteed +- sse41_args += '-mstackrealign' +- endif +- endif +-else +- with_sse41 = false +- sse41_args = [] +-endif ++with_sse41 = false ++sse41_args = [] + + # Check for GCC style atomics + dep_atomic = null_dep diff --git a/n_no-sse2-on-ix86.patch b/n_no-sse2-on-ix86.patch deleted file mode 100644 index 843a1ad..0000000 --- a/n_no-sse2-on-ix86.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -u -r mesa-21.3.3.orig/meson.build mesa-21.3.3/meson.build ---- mesa-21.3.3.orig/meson.build 2022-01-06 19:34:26.332485000 +0100 -+++ mesa-21.3.3/meson.build 2022-01-06 19:32:11.286680000 +0100 -@@ -1231,35 +1231,8 @@ - endif - endif - --if host_machine.cpu_family().startswith('x86') and cc.get_id() != 'msvc' -- pre_args += '-DUSE_SSE41' -- with_sse41 = true -- sse41_args = ['-msse4.1'] -- -- if host_machine.cpu_family() == 'x86' -- if get_option('sse2') -- # These settings make generated GCC code match MSVC and follow -- # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note -- # -- # NOTE: We need to ensure stack is realigned given that we -- # produce shared objects, and have no control over the stack -- # alignment policy of the application. Therefore we need -- # -mstackrealign or -mincoming-stack-boundary=2. -- # -- # XXX: We could have SSE without -mstackrealign if we always used -- # __attribute__((force_align_arg_pointer)), but that's not -- # always the case. -- c_args += ['-msse2', '-mfpmath=sse', '-mstackrealign'] -- else -- # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but -- # that's not guaranteed -- sse41_args += '-mstackrealign' -- endif -- endif --else -- with_sse41 = false -- sse41_args = [] --endif -+with_sse41 = false -+sse41_args = [] - - # Check for GCC style atomics - dep_atomic = null_dep -diff -u -r mesa-21.3.3.orig/src/intel/isl/meson.build mesa-21.3.3/src/intel/isl/meson.build ---- mesa-21.3.3.orig/src/intel/isl/meson.build 2022-01-06 19:33:10.676509000 +0100 -+++ mesa-21.3.3/src/intel/isl/meson.build 2022-01-06 19:40:58.929557000 +0100 -@@ -99,7 +99,7 @@ - inc_include, inc_src, inc_mesa, inc_gallium, inc_intel, - ], - dependencies : idep_mesautil, -- c_args : [no_override_init_args, '-msse2'], -+ c_args : [no_override_init_args, ], - gnu_symbol_visibility : 'hidden', - extra_files : ['isl_tiled_memcpy.c'] - ) -diff -u -r mesa-21.3.3.orig/src/intel/meson.build mesa-21.3.3/src/intel/meson.build ---- mesa-21.3.3.orig/src/intel/meson.build 2022-01-06 19:33:19.801577000 +0100 -+++ mesa-21.3.3/src/intel/meson.build 2022-01-06 19:46:08.372577000 +0100 -@@ -18,7 +18,7 @@ - # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - # SOFTWARE. - --c_sse2_args = ['-msse2', '-mstackrealign'] -+c_sse2_args = ['-mstackrealign'] - inc_intel = include_directories('.') - - subdir('genxml') -diff -u -r mesa-21.3.3.orig/src/intel/perf/meson.build mesa-21.3.3/src/intel/perf/meson.build ---- mesa-21.3.3.orig/src/intel/perf/meson.build 2022-01-06 19:33:19.957531000 +0100 -+++ mesa-21.3.3/src/intel/perf/meson.build 2022-01-06 19:42:22.666599000 +0100 -@@ -37,7 +37,7 @@ - include_directories : [ - inc_include, inc_src, inc_intel, - ], -- c_args : [no_override_init_args, '-msse2'], -- cpp_args : ['-msse2'], -+ c_args : [no_override_init_args], -+ cpp_args : [], - gnu_symbol_visibility : 'hidden', - )