From b37b8a7f29de7e97e0cb3b721297dc90cabedc44 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 18 Dec 2024 16:02:16 +0100 Subject: [PATCH] Don't use wasi sdk on the s390x, it crashes here. Related: RHEL-71763 --- firefox.spec | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/firefox.spec b/firefox.spec index 559b056..76abbe6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -13,7 +13,8 @@ %endif # wasi_sdk is for sandboxing third party c/c++ libs by using rlbox, exclude s390x on the f39. -%bcond_with wasi_sdk + +%global with_wasi_sdk 0 %{lua: function dist_to_rhel_minor(str, start) @@ -75,7 +76,9 @@ end} %global system_nss 1 %endif %if %{rhel_minor_version} >= 10 - %global with_wasi_sdk 1 + %ifnarch s390x + %global with_wasi_sdk 1 + %endif %endif %endif @@ -85,7 +88,9 @@ end} %global system_nss 1 %endif %if %{rhel_minor_version} > 5 - %global with_wasi_sdk 1 + %ifnarch s390x + %global with_wasi_sdk 1 + %endif %endif %endif @@ -405,7 +410,7 @@ BuildRequires: xmlto BuildRequires: zlib-devel %endif -%if %{with wasi_sdk} +%if %{with_wasi_sdk} BuildRequires: lld BuildRequires: clang cmake ninja-build %endif @@ -1179,7 +1184,7 @@ echo "--------------------------------------------" #clang -print-search-dirs %setup -q -n %{name}-%{version} -%if %{with wasi_sdk} +%if %{with_wasi_sdk} %setup -q -T -D -a 50 %endif @@ -1212,7 +1217,7 @@ echo "--------------------------------------------" %endif # We need to create the wasi.patch with the correct path to the wasm libclang_rt. -%if %{with wasi_sdk} +%if %{with_wasi_sdk} export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a; cat %{SOURCE38} | envsubst > %{_sourcedir}/wasi.patch %patch -P203 -p1 -b .wasi %endif @@ -1342,7 +1347,7 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key # Clang 17 upstream's detection fails, tell it where to look. echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig -%if %{with wasi_sdk} +%if %{with_wasi_sdk} echo "ac_add_options --with-wasi-sysroot=`pwd`/wasi-sdk-20/build/install/opt/wasi-sdk/share/wasi-sysroot" >> .mozconfig %else echo "ac_add_options --without-sysroot" >> .mozconfig @@ -1365,7 +1370,7 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs %define _lto_cflags %{nil} #WASI SDK -%if %{with wasi_sdk} +%if %{with_wasi_sdk} pushd wasi-sdk-20 sed -i -e "s|VERSION=.*|VERSION=20|g" tar_from_installation.sh cat tar_from_installation.sh