From 7c13cb11ea951e10fc8254cf83220030e3197d7147c2fd834547fa01169b69f3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 27 Oct 2023 05:56:24 +0000 Subject: [PATCH] leap15.x build support OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/glslang?expand=0&rev=121 --- glslang.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/glslang.spec b/glslang.spec index c8cafa3..294daa9 100644 --- a/glslang.spec +++ b/glslang.spec @@ -30,9 +30,13 @@ Source3: baselibs.conf BuildRequires: bison BuildRequires: cmake >= 3.14.0 BuildRequires: fdupes -BuildRequires: gcc-c++ BuildRequires: python3-base BuildRequires: spirv-tools-devel +%if 0%{?suse_version} && 0%{?suse_version} < 1599 +BuildRequires: gcc11-c++ +%else +BuildRequiers: c++_compiler +%endif %description glslang is a compiler front end for the OpenGL ES and OpenGL shading @@ -87,6 +91,9 @@ but which some downstream packages rely on. %global _lto_cflags %{?_lto_cflags} -ffat-lto-objects # ABI keeps on breaking (gh#3052 #3311 #3312) echo "V_%version { global: *; };" >/tmp/z.sym +%if 0%{?suse_version} && 0%{?suse_version} < 1599 +export CC=gcc-11 CXX=g++-11 +%endif # Trim -Wl,--no-undefined for now (https://github.com/KhronosGroup/glslang/issues/1484) %cmake -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ -DALLOW_EXTERNAL_SPIRV_TOOLS:BOOL=ON -DENABLE_OPT:BOOL=ON