The package rpms/simde.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/simde.git/commit/?id=9746a24be8ff...
https://src.fedoraproject.org/cgit/rpms/simde.git/commit/?id=910139b35b27....
Change:
+%ifarch ppc64le
+%ifarch %{arm}
Thanks.
Full change:
============
commit 9746a24be8ff3c7fece4b93042ffcd11e3c25f8e
Author: Jun Aruga <jaruga(a)redhat.com>
Date: Tue Aug 3 00:05:00 2021 +0200
Drop -fstack-clash-protection in the clang -O2 + flags test.
Drop -fstack-clash-protection in the clang -O2 + flags test as a temporary
workaround on clang 12.0.0 ppc64le. The bug is fixed at clang 12.0.1.
diff --git a/simde.spec b/simde.spec
index 4f55b76..0793a62 100644
--- a/simde.spec
+++ b/simde.spec
@@ -289,8 +289,19 @@ BUILD_DIR="build/clang-flags-macro"
%ifarch %{arm}
%global _lto_cflags %{nil}
%endif
+build_cflags="%{build_cflags}"
+build_cxxflags="%{build_cxxflags}"
+# clang 12.0.0 with -O2 + -fstack-clash-protection causes some errors.
+# The bug is fixed at 12.0.1.
+#
https://bugs.llvm.org/show_bug.cgi?id=49903
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1983633
+%ifarch ppc64le
+# Drop -fstack-clash-protection as a temporary workaround.
+build_cflags=$(echo ${build_cflags} | sed 's/-fstack-clash-protection//')
+build_cxxflags=$(echo ${build_cxxflags} | sed 's/-fstack-clash-protection//')
+%endif
CC="clang" CXX="clang++" \
-CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" \
+CFLAGS="${build_cflags}" CXXFLAGS="${build_cxxflags}" \
_setup
_build
_test
@@ -304,10 +315,12 @@ _test
%{_includedir}/%{name}
%changelog
-* Sun Aug 01 2021 Jun Aruga <jaruga(a)redhat.com> - 0.7.3-1.git3378ab3
+* Mon Aug 02 2021 Jun Aruga <jaruga(a)redhat.com> - 0.7.3-1.git3378ab3
- Upgrade to SIMDe 0.7.3 upstream master branch commit 3378ab3.
- Fix a warning by the rpmlint.
- Unbundle hedley dependency
+- Drop -fstack-clash-protection in the clang -O2 + flags test as a temporary
+ workaround on clang 12.0.0 ppc64le.
* Mon Mar 08 2021 Jun Aruga <jaruga(a)redhat.com> - 0.0.0-8.git396e05c
- Fix FTBFS.
commit 910139b35b2756e12246f6313be169689ea2035e
Author: Jun Aruga <jaruga(a)redhat.com>
Date: Mon Aug 2 07:40:42 2021 +0200
Upgrade to SIMDe 0.7.3 upstream master branch commit 3378ab3.
Merged with squash from rawhide commit
70f613b068267c507e261e68bd088ae637181aa5 .
* Add simde.rpmlintrc.
* Fix a warning by the rpmlint.
* Unbundle hedley dependency
diff --git a/.gitignore b/.gitignore
index ce19be6..f6a3a77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
-/29b911059dd06bc1e4c30d8922871a4b239279e3.tar.gz
-/da8f73412998e4f1adf1100dc187533a51af77fd.tar.gz
-/396e05c694d68c795f0470ef43432eefdfd371f1.tar.gz
+/*.tar.gz
diff --git a/simde.rpmlintrc b/simde.rpmlintrc
new file mode 100644
index 0000000..fab8eb5
--- /dev/null
+++ b/simde.rpmlintrc
@@ -0,0 +1,5 @@
+# Spelling errors.
+addFilter(r'^simde\.src: W: spelling-error %description -l en_US intrinsics ')
+addFilter(r'^simde\.src: W: spelling-error %description -l en_US natively ')
+# The hedley exists as a runtiime dependency of the simde.
+addFilter(r'^simde-devel\.\w+: W: dangling-relative-symlink
/usr/include/simde/hedley\.h \.\./hedley\.h$')
diff --git a/simde.spec b/simde.spec
index 0e8d29b..4f55b76 100644
--- a/simde.spec
+++ b/simde.spec
@@ -1,52 +1,45 @@
-# Run the tests on gcc without flags?
+# Run the tests on gcc?
%bcond_without check_gcc
-# Run the tests on gcc with flags?
-%bcond_without check_gcc_with_flags
-# Run the tests on clang without flags?
+# Run the tests on clang?
%bcond_without check_clang
-# Run the tests on clang with flags?
-%bcond_without check_clang_with_flags
-%global commit_simde 396e05c694d68c795f0470ef43432eefdfd371f1
+%global commit_simde 3378ab337698933ccb2e4068b26acd5c6afe27c5
%global short_commit_simde %(c=%{commit_simde}; echo ${c:0:7})
%global commit_munit da8f73412998e4f1adf1100dc187533a51af77fd
-%global hedley_version 12
# Disable debuginfo package for the header only package.
%global debug_package %{nil}
Name: simde
-# Use a minimum version as there has not been a version release yet.
-# The upstream mentioned "I think I'll start with a 0.5 or something".
-#
https://github.com/nemequ/simde/issues/50
-Version: 0.0.0
+Version: 0.7.3
# Align the release format with the packages setting Source0 by commit hash
# such as podman.spec and moby-engine.spec.
-Release: 8.git%{short_commit_simde}%{?dist}
+Release: 1.git%{short_commit_simde}%{?dist}
Summary: SIMD Everywhere
# find simde/ -type f | xargs licensecheck
-# simde: MIT
-# simde/check.h: CC0
-# simde/debug-trap.h: CC0
-# simde/hedley.h: CC0
-# simde/simde-arch.h: CC0
+# simde: MIT
+# simde/check.h: CC0
+# simde/debug-trap.h: CC0
+# simde/simde-arch.h: CC0
+# removed in %%prep (unbundled):
+# simde/hedley.h: CC0
License: MIT and CC0
-URL:
https://github.com/nemequ/simde
-Source0:
https://github.com/nemequ/%{name}/archive/%{commit_simde}.tar.gz
+URL:
https://github.com/simd-everywhere/simde
+Source0:
https://github.com/simd-everywhere/%{name}/archive/%{commit_simde}.tar.gz
# munit used in the unit test.
Source1:
https://github.com/nemequ/munit/archive/%{commit_munit}.tar.gz
# gcc and clang are used in the unit tests.
-BuildRequires: make
BuildRequires: clang
-BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
+BuildRequires: meson
+# Header-only library dependency
+# See
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_hea...
+BuildRequires: hedley-devel
+BuildRequires: hedley-static
+BuildRequires: %{_bindir}/time
# Do not set noarch for header only package.
# See
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_hea...
-# simde/hedley.h
-#
https://github.com/nemequ/hedley
-Provides: bundled(hedley) = %{hedley_version}
-
%description
%{summary}
The SIMDe header-only library provides fast, portable implementations of SIMD
@@ -58,13 +51,17 @@ NEON on ARM, etc.).
%package devel
Summary: Header files for SIMDe development
Provides: %{name}-static = %{version}-%{release}
+# The API includes the hedley header-only library.
+Requires: hedley-devel%{?_isa}
+Requires: hedley-static
%description devel
The simde-devel package contains the header files needed
to develop programs that use the SIMDe.
%prep
-%autosetup -n %{name}-%{commit_simde}
+%autosetup -n %{name}-%{commit_simde} -p1
+ln -svf %{_includedir}/hedley.h %{name}/
%build
# The %%build section is not used.
@@ -72,9 +69,18 @@ to develop programs that use the SIMDe.
%install
mkdir -p %{buildroot}%{_includedir}
cp -a simde %{buildroot}%{_includedir}
+ln -svf ../hedley.h %{buildroot}%{_includedir}/%{name}/
%check
+# Check version.
+version_major=$(grep '^#define SIMDE_VERSION_MAJOR ' simde/simde-common.h | cut
-d ' ' -f 3)
+version_minor=$(grep '^#define SIMDE_VERSION_MINOR ' simde/simde-common.h | cut
-d ' ' -f 3)
+version_micro=$(grep '^#define SIMDE_VERSION_MICRO ' simde/simde-common.h | cut
-d ' ' -f 3)
+test "%{version}" =
"${version_major}.${version_minor}.${version_micro}"
+
# Check if all the shipped file is a valid header file.
+# Suppress the command logging during the check by running on bash.
+bash - <<\EOF
for file in $(find simde/ -type f); do
if ! [[ "${file}" =~ \.h$ ]]; then
echo "${file} is not a header file."
@@ -84,103 +90,212 @@ for file in $(find simde/ -type f); do
false
fi
done
-
-# Check hedley version correctness.
-test "$(grep '^#define HEDLEY_VERSION ' simde/hedley.h | cut -d ' '
-f3)" = \
- '%{hedley_version}'
+EOF
# Set munit.
rm -rf test/munit
tar xzvf %{SOURCE1}
mv munit-%{commit_munit} test/munit
+# Define functions.
+JOB_NUM="$(nproc)"
+
+function _time {
+ %{_bindir}/time -f '=> [%E]' ${@}
+}
+
+function _setup {
+ meson setup "${BUILD_DIR}" || (
+ cat "${BUILD_DIR}/meson-logs/meson-log.txt"
+ false
+ )
+}
+
+function _build {
+ rm -f build.log
+ _time ninja -C "${BUILD_DIR}" -v -j "${JOB_NUM}" >&
build.log || (
+ cat build.log
+ false
+ )
+ head -4 build.log
+ tail -3 build.log
+}
+
+function _test {
+ _time meson test -C "${BUILD_DIR}" -q --no-rebuild --print-errorlogs
+}
+
+BACKUP_FILES="
+ meson.build
+ test/x86/meson.build
+ test/wasm/simd128/meson.build
+"
+
+function _backup {
+ for file in ${BACKUP_FILES}; do
+ cp -p ${file}{,.orig}
+ done
+}
+
+function _reset {
+ for file in ${BACKUP_FILES}; do
+ cp -p ${file}{.orig,}
+ done
+}
+
+_backup
+
# Run the unit tests.
# gcc
+%if %{with check_gcc}
+bash - <<\EOF
echo "== 1. tests on gcc =="
+EOF
gcc --version
g++ --version
-# without flags
+bash - <<\EOF
echo "=== 1.1. tests on gcc without flags ==="
-%if %{with check_gcc}
-mkdir test/build-gcc
-pushd test/build-gcc
-CC="gcc -fno-strict-aliasing" CXX="g++ -fno-strict-aliasing" cmake
..
-%make_build
-./run-tests
-popd
+EOF
+# gcc 11.1.1 without flags + i686 x86/avx512/dbsad failures
+#
https://github.com/simd-everywhere/simde/issues/867
+%ifarch i686
+sed -i "/^simde_avx512_families/,/\]/ s/'dbsad',/#\0/" meson.build
+%endif
+BUILD_DIR="build/gcc"
+CC="gcc -fno-strict-aliasing" CXX="g++ -fno-strict-aliasing" \
+ _setup
+_build
+_test
+
+bash - <<\EOF
+echo "=== 1.2. tests on gcc with O2 flag ==="
+EOF
+# _reset
+# gcc 11.1.1 with -O2 + s390x arm/neon/{mlal_lane,mlsl_lane} failures
+#
https://github.com/simd-everywhere/simde/issues/874
+%ifarch s390x
+sed -i -E "/^simde_neon_families/,/\]/ s/'(mlal_lane|mlsl_lane)',/#\0/"
meson.build
%endif
+BUILD_DIR="build/gcc-O2"
+CC="gcc -fno-strict-aliasing" CXX="g++ -fno-strict-aliasing" \
+CFLAGS="-O2" CXXFLAGS="-O2" \
+ _setup
+_build
+_test
-# with flags
-echo "=== 1.2. tests on gcc with flags ==="
-# gcc 11 with flags + aarch64: x86/avx512/subs/emul/{c,cpp},
-# x86/sse2/emul/{c,cpp} failures
-#
https://github.com/simd-everywhere/simde/issues/720
-%ifarch aarch64
-sed -i '/^test_simde_mm_subs_epu8(/,/^}$/ s|simde_assert_m128i_u8|//\0|'
test/x86/sse2.c
-sed -i '/^test_simde_mm512_subs_epu8(/,/^}$/ s|simde_assert_m512i_u8|//\0|'
test/x86/avx512bw.c
+bash - <<\EOF
+echo "=== 1.3. tests on gcc with flags macro ==="
+EOF
+# gcc 11 with flags + i686 x86/{sse,sse2} test_simde_mm_cvt* failures
+#
https://github.com/simd-everywhere/simde/issues/719
+%ifarch i686
+sed -i '/^test_simde_mm_cvt_ps2pi *(/,/^}$/
s|simde_test_x86_assert_equal_i32x2|//\0|' \
+ test/x86/sse.c
+sed -i '/^test_simde_mm_cvtps_pi16 *(/,/^}$/
s|simde_test_x86_assert_equal_i16x4|//\0|' \
+ test/x86/sse.c
+sed -i '/^test_simde_mm_cvtsi64_ss *(/,/^}$/
s|simde_test_x86_assert_equal_f32x4|//\0|' \
+ test/x86/sse.c
+sed -i '/^test_simde_mm_cvtsd_si64 *(/,/^}$/ s|simde_assert_equal_i64|//\0|' \
+ test/x86/sse2.c
+sed -i '/^test_simde_mm_cvtsi64_sd *(/,/^}$/ s|simde_assert_m128d_close|//\0|' \
+ test/x86/sse2.c
+sed -i '/^test_simde_mm_cvttsd_si64 *(/,/^}$/ s|simde_assert_equal_i64|//\0|' \
+ test/x86/sse2.c
%endif
-%if %{with check_gcc_with_flags}
-mkdir test/build-gcc-with-flags
-pushd test/build-gcc-with-flags
-CC="gcc -fno-strict-aliasing" CXX="g++ -fno-strict-aliasing" cmake \
- -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
- -DCMAKE_C_FLAGS="%{build_cflags}" \
- -DCMAKE_CXX_FLAGS="%{build_cxxflags}" \
- ..
-%make_build
-./run-tests
-popd
+# gcc 11.1.1 with flags + ppc64le arm/neon failures
+#
https://github.com/simd-everywhere/simde/issues/865
+%ifarch ppc64le
+sed -i -E "/^simde_neon_families/,/\]/ s/'\w+',/#\0/" meson.build
+%endif
+BUILD_DIR="build/gcc-flags-macro"
+CC="gcc -fno-strict-aliasing" CXX="g++ -fno-strict-aliasing" \
+CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" \
+ _setup
+_build
+_test
+
+# with check_gcc
%endif
# clang
+%if %{with check_clang}
%global toolchain clang
+bash - <<\EOF
echo "== 2. tests on clang =="
+EOF
clang --version
clang++ --version
-# without flags
+bash - <<\EOF
echo "=== 2.1. tests on clang without flags ==="
-%if %{with check_clang}
-mkdir test/build-clang
-pushd test/build-clang
-CC=clang CXX=clang++ cmake ..
-%make_build
-./run-tests
-popd
+EOF
+_reset
+# clang 12 + i686 {x86/sse,x86/sse2,arm/neon} failures
+#
https://github.com/simd-everywhere/simde/issues/721
+%ifarch i686
+sed -i -E "/^simde_test_x86_tests/,/\]/ s/'(sse|sse2)',/#\0/"
test/x86/meson.build
+sed -i -E "/^simde_neon_families/,/\]/
s/'(abd|max|min|mla|mls|mls_n|mul|mul_n|pmax|pmin|rev64|sub|zip|zip1|zip2)',/#\0/"
meson.build
+%endif
+# clang 12.0.1 without flags + s390x x86/avx512/shldv, arm/neon/qdmulh* failures
+#
https://github.com/simd-everywhere/simde/issues/869
+%ifarch s390x
+sed -i -E "/^simde_neon_families/,/\]/
s/'(qdmulh|qdmulh_lane|qdmulh_n)',/#\0/" meson.build
+sed -i "/^simde_avx512_families/,/\]/ s/'shldv',/#\0/" meson.build
%endif
+BUILD_DIR="build/clang"
+CC=clang CXX=clang++ \
+ _setup
+_build
+_test
-# with flags
-echo "=== 2.2. tests on clang with flags ==="
-# Skip the test failing on clang-12.
-# We do not report to the upstream, because the source is old.
-# On the latet upstream, the segmentation fault happens on clang-12 with flags.
-# clang-12 with flags + x86_64 ninja build: Segmentation fault
-#
https://github.com/simd-everywhere/simde/issues/717
-sed -i '/^test_simde_mm_maskload_ps(/,/^}$/ s|simde_assert_m128_close|//\0|'
test/x86/avx.c
-%ifarch i686 s390x
-sed -i '/^test_simde_mm_maskload_pd(/,/^}$/ s|simde_assert_m128d_equal|//\0|'
test/x86/avx.c
+bash - <<\EOF
+echo "=== 2.2. tests on clang with O2 flag ==="
+EOF
+_reset
+# clang 12 with -O2 + i686 x86/sse2 test_simde_mm_cvtsi64_sd failures
+#
https://github.com/simd-everywhere/simde/issues/740
+%ifarch i686
+sed -i '/^test_simde_mm_cvtsi64_sd *(/,/^}$/ s|simde_assert_m128d_close|//\0|' \
+ test/x86/sse2.c
%endif
-%if %{with check_clang_with_flags}
-mkdir test/build-clang-with-flags
-pushd test/build-clang-with-flags
-# arm tests fail with segmentation fault in cmake.
-%ifnarch %{arm}
-CC=clang CXX=clang++ cmake \
- -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
- -DCMAKE_C_FLAGS="%{build_cflags}" \
- -DCMAKE_CXX_FLAGS="%{build_cxxflags}" \
- ..
-%make_build
-# ppc64le tests fail with clang-10.0.0, -O2 and some flags
-#
https://github.com/nemequ/simde/issues/273
+# clang 12.0.1 with -O2 + armv7hl wasm_simd128/trunc_sat failures
+#
https://github.com/simd-everywhere/simde/issues/880
+%ifarch %{arm}
+sed -i "/^simde_test_wasm_simd128_tests/,/\]/ s/'trunc_sat',/#\0/"
test/wasm/simd128/meson.build
+%endif
+# clang 12.0.1 with -O2 + ppc64le x86/avx512/ror failures
+#
https://github.com/simd-everywhere/simde/issues/875
%ifarch ppc64le
-./run-tests || true
-%else
-./run-tests
+sed -i "/^simde_avx512_families/,/\]/ s/'ror',/#\0/" meson.build
%endif
+%ifarch s390x
+sed -i -E "/^simde_neon_families/,/\]/
s/'(qdmulh|qdmulh_lane|qdmulh_n)',/#\0/" meson.build
%endif
-popd
+BUILD_DIR="build/clang-O2"
+CC="clang" CXX="clang++" \
+CFLAGS="-O2" CXXFLAGS="-O2" \
+ _setup
+_build
+_test
+
+bash - <<\EOF
+echo "=== 2.3. tests on clang with flags macro ==="
+EOF
+BUILD_DIR="build/clang-flags-macro"
+# clang is broken armv7hl.
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1918924
+# A temporary workaround to avoid the segmentation fault on armv7hl.
+%ifarch %{arm}
+%global _lto_cflags %{nil}
+%endif
+CC="clang" CXX="clang++" \
+CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" \
+ _setup
+_build
+_test
+
+# with check_clang
%endif
%files devel
@@ -189,6 +304,11 @@ popd
%{_includedir}/%{name}
%changelog
+* Sun Aug 01 2021 Jun Aruga <jaruga(a)redhat.com> - 0.7.3-1.git3378ab3
+- Upgrade to SIMDe 0.7.3 upstream master branch commit 3378ab3.
+- Fix a warning by the rpmlint.
+- Unbundle hedley dependency
+
* Mon Mar 08 2021 Jun Aruga <jaruga(a)redhat.com> - 0.0.0-8.git396e05c
- Fix FTBFS.
Resolves: rhbz#1923371
diff --git a/sources b/sources
index 1c48f19..79d0f3a 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (396e05c694d68c795f0470ef43432eefdfd371f1.tar.gz) =
2c1fcb01bef16eefea77201e679d779a906820fd5a1ef153a8918744f5acf4ec4fa0e475326e98c9394c1f88cc3d87c53b077433b80c6c82238779c6ad5405cb
+SHA512 (3378ab337698933ccb2e4068b26acd5c6afe27c5.tar.gz) =
1708e734b326739b1af88576755093c4b8b793343e6c5b4e0ec62b504a49b0cef93d568507a61d80b04c95c664565fa2c99cfd9f8cb37de39169824036db1922
SHA512 (da8f73412998e4f1adf1100dc187533a51af77fd.tar.gz) =
cd08c1291a73487f15fdba7bf8675fea9177f0ec9766900f65efb5f00c662532a16499447e9087d304de34ff9138f47d04ebf18713f5aa8aacede22c5e23b98b