From 78581ffec04f0afbad6b905c8d59ef33beeb516e3948d8d4c490da04a2c290af Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 5 May 2024 22:04:56 +0000 Subject: [PATCH] Accepting request 1172018 from home:dziobian - Fix ftbfs with gcc14: * use correct optflags also in %check * add test-tools-do-not-override-cflags.patch - Execute more tests OBS-URL: https://build.opensuse.org/request/show/1172018 OBS-URL: https://build.opensuse.org/package/show/science/xxhash?expand=0&rev=24 --- test-tools-do-not-override-cflags.patch | 13 +++++++++++++ xxhash.changes | 8 ++++++++ xxhash.spec | 12 ++++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 test-tools-do-not-override-cflags.patch diff --git a/test-tools-do-not-override-cflags.patch b/test-tools-do-not-override-cflags.patch new file mode 100644 index 0000000..76c6623 --- /dev/null +++ b/test-tools-do-not-override-cflags.patch @@ -0,0 +1,13 @@ +--- xxHash-0.8.2/Makefile.old 2023-07-21 12:01:35.000000000 +0200 ++++ xxHash-0.8.2/Makefile 2024-05-05 21:19:32.265851133 +0200 +@@ -450,8 +450,8 @@ test-all: test test32 test-unicode clang + + .PHONY: test-tools + test-tools: +- CFLAGS=-Werror $(MAKE) -C tests/bench +- CFLAGS=-Werror $(MAKE) -C tests/collisions ++ $(MAKE) -C tests/bench ++ $(MAKE) -C tests/collisions + + .PHONY: test-xxh-nnn-sums + test-xxh-nnn-sums: xxhsum_and_links diff --git a/xxhash.changes b/xxhash.changes index 2ed23d9..6ad13f8 100644 --- a/xxhash.changes +++ b/xxhash.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun May 5 19:35:03 UTC 2024 - Bruno Pitrus + +- Fix ftbfs with gcc14: + * use correct optflags also in %check + * add test-tools-do-not-override-cflags.patch +- Execute more tests + ------------------------------------------------------------------- Thu Nov 30 14:43:11 UTC 2023 - Guillaume GARDET diff --git a/xxhash.spec b/xxhash.spec index 103e818..20a112b 100644 --- a/xxhash.spec +++ b/xxhash.spec @@ -24,6 +24,7 @@ License: BSD-2-Clause AND GPL-2.0-only Group: Productivity/Security URL: https://github.com/Cyan4973/xxHash Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}.tar.gz#/xxHash-%{version}.tar.gz +Patch0: test-tools-do-not-override-cflags.patch BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -60,16 +61,23 @@ functions. Hashes are identical on all platforms. %build export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" -export LDFLAGS="%{?_lto_cflags}" +export LDFLAGS="%{?build_ldflags}" %make_build prefix=%{_prefix} libdir=%{_libdir} %install +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" +export LDFLAGS="%{?build_ldflags}" %make_install prefix=%{_prefix} libdir=%{_libdir} rm -rf %{buildroot}%{_libdir}/libxxhash.a %check +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" +export LDFLAGS="%{?build_ldflags}" # not safe for parallel execution as it removes xxhash.o and recreates it with different flags -%make_build -j1 test +# the list is taken from test-all with non-working/irrelevant ones (such as ones that change the toolchain) removed +%make_build -j1 test test-unicode listL120 trailingWhitespace test-xxh-nnn-sums %post -n libxxhash0 -p /sbin/ldconfig %postun -n libxxhash0 -p /sbin/ldconfig