[packages/firefox] upstream fix for xsimd build failure on 32bit x86

atler atler at pld-linux.org
Thu Apr 20 17:20:13 CEST 2023


commit a64588dd074b6fd0dc25f2656ed70504325a6728
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Apr 20 17:19:26 2023 +0200

    upstream fix for xsimd build failure on 32bit x86

 firefox.spec    |  2 ++
 xsimd-x86.patch | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)
---
diff --git a/firefox.spec b/firefox.spec
index fba01fb..2044c3e 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -256,6 +256,7 @@ Source196:	https://releases.mozilla.org/pub/firefox/releases/%{version}/linux-i6
 # Source196-md5:	7bbc162baf78eb53864380683d293c2a
 Source197:	https://releases.mozilla.org/pub/firefox/releases/%{version}/linux-i686/xpi/zh-TW.xpi
 # Source197-md5:	090eb48f7a6045f8f6e6cc800cc7982f
+Patch0:		xsimd-x86.patch
 Patch4:		%{name}-prefs.patch
 Patch5:		%{name}-pld-bookmarks.patch
 Patch6:		%{name}-no-subshell.patch
@@ -2118,6 +2119,7 @@ unpack() {
 %define __unzip unpack
 %setup -q %(seq -f '-a %g' 100 197 | xargs)
 
+%patch0 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p2
diff --git a/xsimd-x86.patch b/xsimd-x86.patch
new file mode 100644
index 0000000..bf3f74f
--- /dev/null
+++ b/xsimd-x86.patch
@@ -0,0 +1,74 @@
+diff --git a/dom/base/nsTextFragment.cpp b/dom/base/nsTextFragment.cpp
+--- a/dom/base/nsTextFragment.cpp
++++ b/dom/base/nsTextFragment.cpp
+@@ -157,11 +157,11 @@
+ 
+   return -1;
+ }
+ 
+ #if defined(MOZILLA_MAY_SUPPORT_SSE2)
+-#  include "nsTextFragmentGeneric.h"
++#  include "nsTextFragmentGenericFwd.h"
+ #endif
+ 
+ #ifdef __powerpc__
+ namespace mozilla {
+ namespace VMX {
+diff --git a/dom/base/nsTextFragmentGeneric.h b/dom/base/nsTextFragmentGeneric.h
+--- a/dom/base/nsTextFragmentGeneric.h
++++ b/dom/base/nsTextFragmentGeneric.h
+@@ -2,14 +2,18 @@
+ /* vim: set ts=8 sts=2 et sw=2 tw=80: */
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
++#ifndef nsTextFragmentGeneric_h__
++#define nsTextFragmentGeneric_h__
++
++#include "nsTextFragmentGenericFwd.h"
++
+ #include "nscore.h"
+ #include "nsTextFragmentImpl.h"
+ #include <algorithm>
+-#include <xsimd/xsimd.hpp>
+ 
+ namespace mozilla {
+ 
+ template <class Arch>
+ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
+@@ -55,5 +59,7 @@
+ 
+   return -1;
+ }
+ 
+ }  // namespace mozilla
++
++#endif
+diff --git a/dom/base/nsTextFragmentGenericFwd.h b/dom/base/nsTextFragmentGenericFwd.h
+new file mode 100644
+--- /dev/null
++++ b/dom/base/nsTextFragmentGenericFwd.h
+@@ -0,0 +1,21 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
++/* vim: set ts=8 sts=2 et sw=2 tw=80: */
++/* This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++#ifndef nsTextFragmentGenericFwd_h__
++#define nsTextFragmentGenericFwd_h__
++
++#include <cstdint>
++#include <cuchar>
++#include <xsimd/xsimd.hpp>
++
++namespace mozilla {
++
++template <class Arch>
++int32_t FirstNon8Bit(const char16_t* str, const char16_t* end);
++
++}  // namespace mozilla
++
++#endif
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/firefox.git/commitdiff/a64588dd074b6fd0dc25f2656ed70504325a6728



More information about the pld-cvs-commit mailing list