--- /dev/null
+--- highway-1.0.6/hwy/base.h.orig 2023-08-11 15:54:08.000000000 +0200
++++ highway-1.0.6/hwy/base.h 2023-08-21 20:19:20.042867861 +0200
+@@ -381,7 +381,7 @@ using float16_t = __fp16;
+ // which is missing __extendhfsf2.
+ #elif ( \
+ (HWY_ARCH_RVV && defined(__riscv_zvfh) && HWY_COMPILER_CLANG) || \
+- (HWY_ARCH_X86 && ((HWY_COMPILER_CLANG >= 1600 && !HWY_COMPILER_CLANGCL) || \
++ (HWY_ARCH_X86 && defined(__sse2__) && ((HWY_COMPILER_CLANG >= 1600 && !HWY_COMPILER_CLANGCL) || \
+ HWY_COMPILER_GCC_ACTUAL >= 1200)))
+ using float16_t = _Float16;
+ // 3) Otherwise emulate
--- /dev/null
+With gcc 13 AVX is used in static initialization in math_test.cc
+--- highway-1.0.6/CMakeLists.txt.orig 2023-08-11 15:54:08.000000000 +0200
++++ highway-1.0.6/CMakeLists.txt 2023-08-21 21:31:34.886441037 +0200
+@@ -564,7 +564,6 @@ list(APPEND HWY_TEST_FILES
+ hwy/contrib/image/image_test.cc
+ # Disabled due to SIGILL in clang7 debug build during gtest discovery phase,
+ # not reproducible locally. Still tested via bazel build.
+- hwy/contrib/math/math_test.cc
+ hwy/contrib/sort/sort_test.cc
+ hwy/contrib/sort/bench_sort.cc
+ hwy/contrib/unroller/unroller_test.cc
#
# Conditional build:
%bcond_without apidocs # API documentation
+%bcond_with sse2 # SSE2 instructions on x86/x32
%bcond_without tests # don't build tests
#
Summary: Efficient and performance-portable SIMD
Summary(pl.UTF-8): Wydajne i przenoĊne operacje SIMD
Name: highway
Version: 1.0.6
-Release: 1
+Release: 2
License: Apache v2.0
Group: Libraries
#Source0Download: https://github.com/google/highway/releases
Source0: https://github.com/google/highway/archive/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 405abf8d94b618befd44b2cb60a90c0e
+Patch0: %{name}-float16.patch
+Patch1: %{name}-no-avx.patch
URL: https://github.com/google/highway
BuildRequires: cmake >= 3.10
%{?with_tests:BuildRequires: gtest-devel}
BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.742
+%{?with_sse2:Requires: cpuinfo(sse2)}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%build
install -d build
cd build
+%if %{with sse2}
+CXXFLAGS="%{rpmcxxflags} -msse2"
+%endif
%cmake .. \
%{cmake_on_off tests BUILD_TESTING} \
-DCMAKE_INSTALL_INCLUDEDIR=include \