diff options
Diffstat (limited to 'gnu/packages/patches')
80 files changed, 6883 insertions, 624 deletions
diff --git a/gnu/packages/patches/adb-libssl_11-compatibility.patch b/gnu/packages/patches/adb-libssl_11-compatibility.patch new file mode 100644 index 0000000000..9affe58b5d --- /dev/null +++ b/gnu/packages/patches/adb-libssl_11-compatibility.patch @@ -0,0 +1,35 @@ +This patch is taken from Debian +URL: https://sources.debian.org/data/main/a/android-platform-system-core/1%3A7.0.0%2Br33-1/debian/patches/adb_libssl_11.diff +Description: adb: Make compatible with openssl 1.1 + OpenSSL version 1.1 brought some API changes which broke the build here, + fix that by accessing rsa->n (and e) directly, using RSA_get0_key instead. +Author: Chirayu Desai <chirayudesai1@gmail.com +Last-Update: 2016-11-10 +--- a/adb/adb_auth_host.cpp ++++ b/adb/adb_auth_host.cpp +@@ -71,6 +71,7 @@ + BIGNUM* rem = BN_new(); + BIGNUM* n = BN_new(); + BIGNUM* n0inv = BN_new(); ++ BIGNUM* e = BN_new(); + + if (RSA_size(rsa) != RSANUMBYTES) { + ret = 0; +@@ -78,7 +79,7 @@ + } + + BN_set_bit(r32, 32); +- BN_copy(n, rsa->n); ++ RSA_get0_key(rsa, &n, &e, NULL); + BN_set_bit(r, RSANUMWORDS * 32); + BN_mod_sqr(rr, r, n, ctx); + BN_div(NULL, rem, n, r32, ctx); +@@ -92,7 +93,7 @@ + BN_div(n, rem, n, r32, ctx); + pkey->n[i] = BN_get_word(rem); + } +- pkey->exponent = BN_get_word(rsa->e); ++ pkey->exponent = BN_get_word(e); + + out: + BN_free(n0inv); diff --git a/gnu/packages/patches/beets-werkzeug-compat.patch b/gnu/packages/patches/beets-werkzeug-compat.patch deleted file mode 100644 index 1a91c3a3f9..0000000000 --- a/gnu/packages/patches/beets-werkzeug-compat.patch +++ /dev/null @@ -1,18 +0,0 @@ -Be compatible with python-werkzeug 1.0.0. - -Taken from upstream: -https://github.com/beetbox/beets/commit/d43d54e21cde97f57f19486925ab56b419254cc8 - -diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py -index f53fb3a954..21ff5d94ed 100644 ---- a/beetsplug/web/__init__.py -+++ b/beetsplug/web/__init__.py -@@ -169,7 +169,7 @@ def to_python(self, value): - return ids - - def to_url(self, value): -- return ','.join(value) -+ return ','.join(str(v) for v in value) - - - class QueryConverter(PathConverter): diff --git a/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch b/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch new file mode 100644 index 0000000000..1fd3d3d9b7 --- /dev/null +++ b/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch @@ -0,0 +1,231 @@ +From 1c611b40e6bfc8029bff7696814330b5bc0ee5c0 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" <hjl.tools@gmail.com> +Date: Mon, 26 Jul 2021 05:59:55 -0700 +Subject: [PATCH] bfd: Close the file descriptor if there is no archive fd + +Close the file descriptor if there is no archive plugin file descriptor +to avoid running out of file descriptors on thin archives with many +archive members. + +bfd/ + + PR ld/28138 + * plugin.c (bfd_plugin_close_file_descriptor): Close the file + descriptor there is no archive plugin file descriptor. + +ld/ + + PR ld/28138 + * testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for + native build. + + PR ld/28138 + * testsuite/ld-plugin/lto.exp: Run ld/28138 tests. + * testsuite/ld-plugin/pr28138.c: New file. + * testsuite/ld-plugin/pr28138-1.c: Likewise. + * testsuite/ld-plugin/pr28138-2.c: Likewise. + * testsuite/ld-plugin/pr28138-3.c: Likewise. + * testsuite/ld-plugin/pr28138-4.c: Likewise. + * testsuite/ld-plugin/pr28138-5.c: Likewise. + * testsuite/ld-plugin/pr28138-6.c: Likewise. + * testsuite/ld-plugin/pr28138-7.c: Likewise. + +(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742) +(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2) +--- + bfd/plugin.c | 8 +++++++ + ld/testsuite/ld-plugin/lto.exp | 34 ++++++++++++++++++++++++++++++ + ld/testsuite/ld-plugin/pr28138-1.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-2.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-3.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-4.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-5.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-6.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138-7.c | 6 ++++++ + ld/testsuite/ld-plugin/pr28138.c | 20 ++++++++++++++++++ + 10 files changed, 104 insertions(+) + create mode 100644 ld/testsuite/ld-plugin/pr28138-1.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-2.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-3.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-4.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-5.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-6.c + create mode 100644 ld/testsuite/ld-plugin/pr28138-7.c + create mode 100644 ld/testsuite/ld-plugin/pr28138.c + +diff --git a/bfd/plugin.c b/bfd/plugin.c +index 6cfa2b66470..3bab8febe88 100644 +--- a/bfd/plugin.c ++++ b/bfd/plugin.c +@@ -291,6 +291,14 @@ bfd_plugin_close_file_descriptor (bfd *abfd, int fd) + && !bfd_is_thin_archive (abfd->my_archive)) + abfd = abfd->my_archive; + ++ /* Close the file descriptor if there is no archive plugin file ++ descriptor. */ ++ if (abfd->archive_plugin_fd == -1) ++ { ++ close (fd); ++ return; ++ } ++ + abfd->archive_plugin_fd_open_count--; + /* Dup the archive plugin file descriptor for later use, which + will be closed by _bfd_archive_close_and_cleanup. */ +diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp +index def69e43ab3..999d911ce6a 100644 +--- a/ld/testsuite/ld-plugin/lto.exp ++++ b/ld/testsuite/ld-plugin/lto.exp +@@ -687,6 +687,40 @@ if { [is_elf_format] && [check_lto_shared_available] } { + } + } + ++run_cc_link_tests [list \ ++ [list \ ++ "Build pr28138.a" \ ++ "-T" "" \ ++ {pr28138-1.c pr28138-2.c pr28138-3.c pr28138-4.c pr28138-5.c \ ++ pr28138-6.c pr28138-7.c} {} "pr28138.a" \ ++ ] \ ++ [list \ ++ "Build pr28138.o" \ ++ "" "" \ ++ {pr28138.c} {} \ ++ ] \ ++] ++ ++set exec_output [run_host_cmd "sh" \ ++ "-c \"ulimit -n 20; \ ++ $CC -Btmpdir/ld -o tmpdir/pr28138 \ ++ tmpdir/pr28138.o tmpdir/pr28138.a\""] ++set exec_output [prune_warnings $exec_output] ++if [string match "" $exec_output] then { ++ if { [isnative] } { ++ set exec_output [run_host_cmd "tmpdir/pr28138" ""] ++ if [string match "PASS" $exec_output] then { ++ pass "PR ld/28138" ++ } else { ++ fail "PR ld/28138" ++ } ++ } else { ++ pass "PR ld/28138" ++ } ++} else { ++ fail "PR ld/28138" ++} ++ + set testname "Build liblto-11.a" + remote_file host delete "tmpdir/liblto-11.a" + set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"] +diff --git a/ld/testsuite/ld-plugin/pr28138-1.c b/ld/testsuite/ld-plugin/pr28138-1.c +new file mode 100644 +index 00000000000..51d119e1642 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-1.c +@@ -0,0 +1,6 @@ ++extern int a0(void); ++int ++a1(void) ++{ ++ return 1 + a0(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-2.c b/ld/testsuite/ld-plugin/pr28138-2.c +new file mode 100644 +index 00000000000..1120cd797e9 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-2.c +@@ -0,0 +1,6 @@ ++extern int a1(void); ++int ++a2(void) ++{ ++ return 1 + a1(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-3.c b/ld/testsuite/ld-plugin/pr28138-3.c +new file mode 100644 +index 00000000000..ec464947ee6 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-3.c +@@ -0,0 +1,6 @@ ++extern int a2(void); ++int ++a3(void) ++{ ++ return 1 + a2(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-4.c b/ld/testsuite/ld-plugin/pr28138-4.c +new file mode 100644 +index 00000000000..475701b2c5c +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-4.c +@@ -0,0 +1,6 @@ ++extern int a3(void); ++int ++a4(void) ++{ ++ return 1 + a3(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-5.c b/ld/testsuite/ld-plugin/pr28138-5.c +new file mode 100644 +index 00000000000..e24f86c363e +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-5.c +@@ -0,0 +1,6 @@ ++extern int a4(void); ++int ++a5(void) ++{ ++ return 1 + a4(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-6.c b/ld/testsuite/ld-plugin/pr28138-6.c +new file mode 100644 +index 00000000000..b5b938bdb21 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-6.c +@@ -0,0 +1,6 @@ ++extern int a5(void); ++int ++a6(void) ++{ ++ return 1 + a5(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138-7.c b/ld/testsuite/ld-plugin/pr28138-7.c +new file mode 100644 +index 00000000000..4ef75bf0f0c +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138-7.c +@@ -0,0 +1,6 @@ ++extern int a6(void); ++int ++a7(void) ++{ ++ return 1 + a6(); ++} +diff --git a/ld/testsuite/ld-plugin/pr28138.c b/ld/testsuite/ld-plugin/pr28138.c +new file mode 100644 +index 00000000000..68252c9f382 +--- /dev/null ++++ b/ld/testsuite/ld-plugin/pr28138.c +@@ -0,0 +1,20 @@ ++#include <stdio.h> ++ ++extern int a7(void); ++ ++int ++a0(void) ++{ ++ return 0; ++} ++ ++int ++main() ++{ ++ if (a7() == 7) ++ { ++ printf ("PASS\n"); ++ return 0; ++ } ++ return 1; ++} +-- +2.27.0 diff --git a/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch b/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch new file mode 100644 index 0000000000..0629212688 --- /dev/null +++ b/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch @@ -0,0 +1,126 @@ +Description: Move tests that trigger -Warray-bounds to separate compilation unit + GCC 10 is now smart enough to detect violation of array boundaries that tests + are actually tested. Along with -Werror this led to tests failure, so I move + such tests to another compilation unit to have the warning deactivated for + only these tests. +Bug-Debian: https://bugs.debian.org/966895 +Author: Nicholas Guriev <guriev-ns@ya.ru> +Last-Modified: Wed, 19 Aug 2020 08:55:52 +0300 + +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -179,6 +179,7 @@ add_gsl_test(owner_tests) + add_gsl_test(byte_tests) + add_gsl_test(algorithm_tests) + add_gsl_test(strict_notnull_tests) ++add_gsl_test(array_bounds) + + + # No exception tests +--- /dev/null ++++ b/tests/array_bounds.cpp +@@ -0,0 +1,68 @@ ++/////////////////////////////////////////////////////////////////////////////// ++// ++// Copyright (c) 2015 Microsoft Corporation. All rights reserved. ++// ++// This code is licensed under the MIT License (MIT). ++// ++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++// THE SOFTWARE. ++// ++/////////////////////////////////////////////////////////////////////////////// ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic warning "-Warray-bounds" ++#endif // __GNUC__ ++ ++#include <gtest/gtest.h> ++ ++#include <gsl/multi_span> // for gsl::multi_span ++ ++namespace gsl ++{ ++struct fail_fast; ++} // namespace gsl ++ ++namespace ++{ ++static constexpr char deathstring[] = "Expected Death"; ++} // namespace ++ ++TEST(array_bounds, subspan_from_multi_span_test) ++{ ++ int arr[5] = {1, 2, 3, 4, 5}; ++ gsl::multi_span<int> av = arr; ++ ++ std::set_terminate([] { ++ std::cerr << "Expected Death. subspan"; ++ std::abort(); ++ }); ++ ++ EXPECT_DEATH(av.subspan(6).length(), deathstring); ++} ++ ++TEST(array_bounds, strided_span_bounds_from_strided_span_tests) ++{ ++ int arr[] = {0, 1, 2, 3}; ++ gsl::multi_span<int> av(arr); ++ ++ std::set_terminate([] { ++ std::cerr << "Expected Death. strided_span_bounds"; ++ std::abort(); ++ }); ++ ++ // incorrect sections ++ EXPECT_DEATH(av.section(0, 0)[0], deathstring); ++ EXPECT_DEATH(av.section(1, 0)[0], deathstring); ++ EXPECT_DEATH(av.section(1, 1)[1], deathstring); ++ ++ EXPECT_DEATH(av.section(2, 5), deathstring); ++ EXPECT_DEATH(av.section(5, 2), deathstring); ++ EXPECT_DEATH(av.section(5, 0), deathstring); ++ EXPECT_DEATH(av.section(0, 5), deathstring); ++ EXPECT_DEATH(av.section(5, 5), deathstring); ++} +--- a/tests/multi_span_tests.cpp ++++ b/tests/multi_span_tests.cpp +@@ -1042,10 +1042,6 @@ TEST(multi_span_test, subspan) + EXPECT_TRUE(av.subspan(1).length() == 4); + EXPECT_TRUE(av.subspan(4).length() == 1); + EXPECT_TRUE(av.subspan(5).length() == 0); +- // Disabled test instead of fixing since multi_span is deprecated. (PR#835) +-#if !(defined(__GNUC__) && __GNUC__ == 8) +- EXPECT_DEATH(av.subspan(6).length(), deathstring); +-#endif + auto av2 = av.subspan(1); + for (int i = 0; i < 4; ++i) EXPECT_TRUE(av2[i] == i + 2); + } +--- a/tests/strided_span_tests.cpp ++++ b/tests/strided_span_tests.cpp +@@ -403,20 +403,6 @@ TEST(strided_span_tests, strided_span_bo + }); + + { +- // incorrect sections +- +- EXPECT_DEATH(av.section(0, 0)[0], deathstring); +- EXPECT_DEATH(av.section(1, 0)[0], deathstring); +- EXPECT_DEATH(av.section(1, 1)[1], deathstring); +- +- EXPECT_DEATH(av.section(2, 5), deathstring); +- EXPECT_DEATH(av.section(5, 2), deathstring); +- EXPECT_DEATH(av.section(5, 0), deathstring); +- EXPECT_DEATH(av.section(0, 5), deathstring); +- EXPECT_DEATH(av.section(5, 5), deathstring); +- } +- +- { + // zero stride + strided_span<int, 1> sav{av, {{4}, {}}}; + EXPECT_TRUE(sav[0] == 0); diff --git a/gnu/packages/patches/cheese-vala-update.patch b/gnu/packages/patches/cheese-vala-update.patch new file mode 100644 index 0000000000..cb18952ce4 --- /dev/null +++ b/gnu/packages/patches/cheese-vala-update.patch @@ -0,0 +1,180 @@ +Taken from upstream: +https://gitlab.gnome.org/GNOME/cheese/-/commit/7cf6268e54620bbbe5e6e61800c50fb0cb4bea57.patch. + +From 7cf6268e54620bbbe5e6e61800c50fb0cb4bea57 Mon Sep 17 00:00:00 2001 From: +=?UTF-8?q?Corentin=20No=C3=ABl?= <corentin@elementary.io> Date: Fri, 16 Oct +2020 19:56:26 +0200 Subject: [PATCH] Change GLib.PtrArray into +GLib.GenericArray + +This is the vala-friendly way of handling GPtrArray. +Fix several memory leaks on the go and unnecessary reference increase. +--- + src/cheese-preferences.vala | 26 ++++++++++++-------------- + src/cheese-window.vala | 22 +++++++++++----------- + src/vapi/cheese-common.vapi | 2 +- + 3 files changed, 24 insertions(+), 26 deletions(-) + +diff --git a/src/cheese-preferences.vala b/src/cheese-preferences.vala +index f56af7e0..80a92431 100644 +--- a/src/cheese-preferences.vala ++++ b/src/cheese-preferences.vala +@@ -100,7 +100,7 @@ public PreferencesDialog (Cheese.Camera camera) + */ + private void initialize_camera_devices () + { +- unowned GLib.PtrArray devices = camera.get_camera_devices (); ++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices (); + camera_model = new Gtk.ListStore (2, typeof (string), typeof (Cheese.CameraDevice)); + + source_combo.model = camera_model; +@@ -357,13 +357,13 @@ public PreferencesDialog (Cheese.Camera camera) + */ + private void on_camera_update_num_camera_devices () + { +- unowned GLib.PtrArray devices = camera.get_camera_devices (); +- Cheese.CameraDevice dev; ++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices (); ++ unowned Cheese.CameraDevice dev; + + // Add (if) / Remove (else) a camera device. +- if (devices.len > camera_model.iter_n_children (null)) ++ if (devices.length > camera_model.iter_n_children (null)) + { +- dev = (Cheese.CameraDevice) devices.index (devices.len - 1); ++ dev = devices.get (devices.length - 1); + add_camera_device(dev); + } + else +@@ -382,12 +382,11 @@ public PreferencesDialog (Cheese.Camera camera) + bool device_removed = false; + devices.foreach ((device) => + { +- var old_device = (Cheese.CameraDevice) device; + Cheese.CameraDevice new_device; + camera_model.get (iter, 1, out new_device, -1); + + // Found the device that was removed. +- if (old_device != new_device) ++ if (device != new_device) + { + remove_camera_device (iter, new_device, active_device); + device_removed = true; +@@ -418,17 +417,16 @@ public PreferencesDialog (Cheese.Camera camera) + * + * @param device a Cheese.CameraDevice to add to the device combo box model + */ +- private void add_camera_device (void *device) ++ private void add_camera_device (Cheese.CameraDevice device) + { + TreeIter iter; +- Cheese.CameraDevice dev = (Cheese.CameraDevice) device; + + camera_model.append (out iter); + camera_model.set (iter, +- 0, dev.get_name (), +- 1, dev); ++ 0, device.get_name (), ++ 1, device); + +- if (camera.get_selected_device () == dev) ++ if (camera.get_selected_device () == device) + source_combo.set_active_iter (iter); + + if (camera_model.iter_n_children (null) > 1) +@@ -445,12 +443,12 @@ public PreferencesDialog (Cheese.Camera camera) + private void remove_camera_device (TreeIter iter, Cheese.CameraDevice device_node, + Cheese.CameraDevice active_device_node) + { +- unowned GLib.PtrArray devices = camera.get_camera_devices (); ++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices (); + + // Check if the camera that we want to remove, is the active one + if (device_node == active_device_node) + { +- if (devices.len > 0) ++ if (devices.length > 0) + set_new_available_camera_device (iter); + else + this.hide (); +diff --git a/src/cheese-window.vala b/src/cheese-window.vala +index ff069808..cc119b68 100644 +--- a/src/cheese-window.vala ++++ b/src/cheese-window.vala +@@ -1216,9 +1216,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow + */ + public void on_switch_camera_clicked () + { +- Cheese.CameraDevice selected; +- Cheese.CameraDevice next = null; +- GLib.PtrArray cameras; ++ unowned Cheese.CameraDevice selected; ++ unowned Cheese.CameraDevice next = null; ++ GLib.GenericArray<unowned Cheese.CameraDevice> cameras; + uint i; + + if (camera == null) +@@ -1235,9 +1235,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow + + cameras = camera.get_camera_devices (); + +- for (i = 0; i < cameras.len; i++) ++ for (i = 0; i < cameras.length; i++) + { +- next = (Cheese.CameraDevice )cameras.index (i); ++ next = cameras.get (i); + + if (next == selected) + { +@@ -1245,13 +1245,13 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow + } + } + +- if (i + 1 < cameras.len) ++ if (i + 1 < cameras.length) + { +- next = (Cheese.CameraDevice )cameras.index (i + 1); ++ next = cameras.get (i + 1); + } + else + { +- next = (Cheese.CameraDevice )cameras.index (0); ++ next = cameras.get (0); + } + + if (next == selected) +@@ -1269,8 +1269,8 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow + */ + public void set_switch_camera_button_state () + { +- Cheese.CameraDevice selected; +- GLib.PtrArray cameras; ++ unowned Cheese.CameraDevice selected; ++ GLib.GenericArray<unowned Cheese.CameraDevice> cameras; + + if (camera == null) + { +@@ -1288,7 +1288,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow + + cameras = camera.get_camera_devices (); + +- if (cameras.len > 1) ++ if (cameras.length > 1) + { + switch_camera_button.set_visible (true); + return; +diff --git a/src/vapi/cheese-common.vapi b/src/vapi/cheese-common.vapi +index 6517cdfc..e4ae7ad3 100644 +--- a/src/vapi/cheese-common.vapi ++++ b/src/vapi/cheese-common.vapi +@@ -35,7 +35,7 @@ namespace Cheese + [CCode (has_construct_function = false)] + public Camera (Clutter.Actor video_texture, string camera_device_node, int x_resolution, int y_resolution); + public bool get_balance_property_range (string property, double min, double max, double def); +- public unowned GLib.PtrArray get_camera_devices (); ++ public GLib.GenericArray<unowned Cheese.CameraDevice> get_camera_devices (); + public unowned Cheese.VideoFormat get_current_video_format (); + public int get_num_camera_devices (); + public unowned Cheese.CameraDevice get_selected_device (); +-- +GitLab + diff --git a/gnu/packages/patches/classpath-miscompilation.patch b/gnu/packages/patches/classpath-miscompilation.patch new file mode 100644 index 0000000000..c3a569ea4f --- /dev/null +++ b/gnu/packages/patches/classpath-miscompilation.patch @@ -0,0 +1,71 @@ +For some reason, the original code gets miscompiled on x86_64, leading +'Java_java_io_VMFile_isFile' to return true when the return value of +'cpio_checkType' is ENOENT (= 2). + +See <https://issues.guix.gnu.org/issue/36685> +and <https://issues.guix.gnu.org/49990>. + +diff --git a/native/jni/java-io/java_io_VMFile.c b/native/jni/java-io/java_io_VMFile.c +index de1320b..6695e1f 100644 +--- a/native/jni/java-io/java_io_VMFile.c ++++ b/native/jni/java-io/java_io_VMFile.c +@@ -240,6 +240,7 @@ Java_java_io_VMFile_exists (JNIEnv * env, + #ifndef WITHOUT_FILESYSTEM + const char *filename; + int result; ++ jboolean exists; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -250,9 +251,10 @@ Java_java_io_VMFile_exists (JNIEnv * env, + } + + result = cpio_isFileExists (filename); ++ exists = (result == CPNATIVE_OK ? 1 : 0); + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK ? 1 : 0; ++ return exists; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ +@@ -278,6 +280,7 @@ Java_java_io_VMFile_isFile (JNIEnv * env, + const char *filename; + int result; + jint entryType; ++ jboolean isfile; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -288,9 +291,10 @@ Java_java_io_VMFile_isFile (JNIEnv * env, + } + + result = cpio_checkType (filename, &entryType); ++ isfile = (result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0); + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0; ++ return isfile; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ +@@ -315,6 +319,7 @@ Java_java_io_VMFile_isDirectory (JNIEnv * env, + const char *filename; + int result; + jint entryType; ++ jboolean isdirectory; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -325,9 +330,10 @@ Java_java_io_VMFile_isDirectory (JNIEnv * env, + } + + result = cpio_checkType (filename, &entryType); ++ isdirectory = (result == CPNATIVE_OK && entryType == CPFILE_DIRECTORY ? 1 : 0); + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK && entryType == CPFILE_DIRECTORY ? 1 : 0; ++ return isdirectory; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ diff --git a/gnu/packages/patches/cpuinfo-system-libraries.patch b/gnu/packages/patches/cpuinfo-system-libraries.patch new file mode 100644 index 0000000000..e25446e9da --- /dev/null +++ b/gnu/packages/patches/cpuinfo-system-libraries.patch @@ -0,0 +1,50 @@ +This patch allows the build process to use the provided dependencies instead +of adding their source as CMake sub-directories (in which case "make install" +would install googletest's and googlebenchmark's libraries and headers). + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 57abc26..761c612 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -93,7 +93,7 @@ SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps + CACHE PATH "Confu-style dependencies binary directory") + + IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) +- IF(CPUINFO_SUPPORTED_PLATFORM AND NOT DEFINED GOOGLETEST_SOURCE_DIR) ++ IF(FALSE) + MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -105,7 +105,7 @@ IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) + ENDIF() + + IF(CPUINFO_BUILD_BENCHMARKS) +- IF(CPUINFO_SUPPORTED_PLATFORM AND NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR) ++ IF(FALSE) + MESSAGE(STATUS "Downloading Google Benchmark to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -271,14 +271,6 @@ INSTALL(TARGETS cpuinfo + + # ---[ cpuinfo micro-benchmarks + IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS) +- # ---[ Build google benchmark +- IF(NOT TARGET benchmark) +- SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "") +- ADD_SUBDIRECTORY( +- "${GOOGLEBENCHMARK_SOURCE_DIR}" +- "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark") +- ENDIF() +- + IF(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Android)$") + ADD_EXECUTABLE(get-current-bench bench/get-current.cc) + TARGET_LINK_LIBRARIES(get-current-bench cpuinfo benchmark) +@@ -289,7 +281,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS) + ENDIF() + + IF(CPUINFO_SUPPORTED_PLATFORM) +- IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) ++ IF(FALSE) + # ---[ Build google test + IF(NOT TARGET gtest) + IF(MSVC AND NOT CPUINFO_RUNTIME_TYPE STREQUAL "static") diff --git a/gnu/packages/patches/esmtp-add-lesmtp.patch b/gnu/packages/patches/esmtp-add-lesmtp.patch new file mode 100644 index 0000000000..eb863cd397 --- /dev/null +++ b/gnu/packages/patches/esmtp-add-lesmtp.patch @@ -0,0 +1,37 @@ +From 9b09ff673954c459218e2c664386286ca68aae51 Mon Sep 17 00:00:00 2001 +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Sat, 24 Jul 2021 23:55:26 +0200 +Subject: [PATCH] gnu: esmtp: Always assume that -lesmtp will work. + +libesmtp 1.1.0 removed the libesmtp-config helper in favour of pkg-config. +This does not use that (I lack the chops and the patience). Assume that +the build environment has everything set up for us, which is true on Guix. +--- + configure.ac | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9252ec2..7ccf71a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -32,15 +32,8 @@ then + AC_CHECK_HEADER(libesmtp.h, ,[AC_MSG_ERROR([libesmtp.h not found in $with_libesmtp])]) + fi + AC_MSG_CHECKING(for libESMTP) +-if libesmtp-config --version > /dev/null 2>&1 +-then +- AC_MSG_RESULT(yes) +- CFLAGS="$CFLAGS `libesmtp-config --cflags`" +- LIBS="$LIBS `libesmtp-config --libs`" +-else +- AC_MSG_RESULT(no) +- AC_MSG_ERROR(libESMTP library not found) +-fi ++AC_MSG_RESULT(assumed) ++LIBS="$LIBS -lesmtp" + + jrf_FUNC_GETOPT + +-- +2.32.0 + diff --git a/gnu/packages/patches/evolution-data-server-printableoptions.patch b/gnu/packages/patches/evolution-data-server-printableoptions.patch new file mode 100644 index 0000000000..e40c5f3875 --- /dev/null +++ b/gnu/packages/patches/evolution-data-server-printableoptions.patch @@ -0,0 +1,57 @@ +Patch adapted from upstream c3915bb99638c1ccf57217097b14b5db69bcac96 +by Milan Crha: + + PrintableOptions.cmake: Correct variable name comparison + + CMake 3.20.1 errors out with: + + CMake Error at cmake/modules/PrintableOptions.cmake:38 (message): + variable name cannot be empty + Call Stack (most recent call first): + CMakeLists.txt:152 (add_printable_variable) + + Change how the parameter value is compared, to fix it. + +--- a/cmake/modules/PrintableOptions.cmake ++++ b/cmake/modules/PrintableOptions.cmake +@@ -19,32 +19,32 @@ + # prints all the build options previously added with the above functions + + macro(add_printable_variable_bare _name) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "variable name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + list(APPEND _printable_options ${_name}) + endmacro() + + macro(add_printable_option _name _description _default_value) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "option name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + option(${_name} ${_description} ${_default_value}) + add_printable_variable_bare(${_name}) + endmacro() + + macro(add_printable_variable _name _description _default_value) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "variable name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + set(${_name} ${_default_value} CACHE STRING ${_description}) + add_printable_variable_bare(${_name}) + endmacro() + + macro(add_printable_variable_path _name _description _default_value) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "path variable name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + set(${_name} ${_default_value} CACHE PATH ${_description}) + add_printable_variable_bare(${_name}) + endmacro() diff --git a/gnu/packages/patches/evolution-printableoptions.patch b/gnu/packages/patches/evolution-printableoptions.patch new file mode 100644 index 0000000000..55bee381f4 --- /dev/null +++ b/gnu/packages/patches/evolution-printableoptions.patch @@ -0,0 +1,57 @@ +Patch adapted from evolution-data-server's +c3915bb99638c1ccf57217097b14b5db69bcac96 upstream patch by Milan Crha: + + PrintableOptions.cmake: Correct variable name comparison + + CMake 3.20.1 errors out with: + + CMake Error at cmake/modules/PrintableOptions.cmake:38 (message): + variable name cannot be empty + Call Stack (most recent call first): + CMakeLists.txt:152 (add_printable_variable) + + Change how the parameter value is compared, to fix it. + +--- a/cmake/modules/PrintableOptions.cmake ++++ b/cmake/modules/PrintableOptions.cmake +@@ -19,32 +19,32 @@ + # prints all the build options previously added with the above functions + + macro(add_printable_variable_bare _name) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "variable name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + list(APPEND _printable_options ${_name}) + endmacro() + + macro(add_printable_option _name _description _default_value) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "option name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + option(${_name} ${_description} ${_default_value}) + add_printable_variable_bare(${_name}) + endmacro() + + macro(add_printable_variable _name _description _default_value) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "variable name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + set(${_name} ${_default_value} CACHE STRING ${_description}) + add_printable_variable_bare(${_name}) + endmacro() + + macro(add_printable_variable_path _name _description _default_value) +- if(_name STREQUAL "") ++ if("${_name}" STREQUAL "") + message(FATAL_ERROR "path variable name cannot be empty") +- endif(_name STREQUAL "") ++ endif("${_name}" STREQUAL "") + set(${_name} ${_default_value} CACHE PATH ${_description}) + add_printable_variable_bare(${_name}) + endmacro() diff --git a/gnu/packages/patches/extempore-unbundle-external-dependencies.patch b/gnu/packages/patches/extempore-unbundle-external-dependencies.patch index e9484f7994..e72f995f0b 100644 --- a/gnu/packages/patches/extempore-unbundle-external-dependencies.patch +++ b/gnu/packages/patches/extempore-unbundle-external-dependencies.patch @@ -1,19 +1,27 @@ -Remove build machinery for bundled dependencies. +From b48ef9af13a154939acc245c32d72358001d00f1 Mon Sep 17 00:00:00 2001 +From: Giacomo Leidi <goodoldpaul@autistici.org> +Date: Sun, 20 Jun 2021 12:53:27 +0200 +Subject: [PATCH] Remove build machinery for bundled dependencies. + +--- + CMakeLists.txt | 192 +------------------------------------------------ + 1 file changed, 1 insertion(+), 191 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 89e6125e..c5e90750 100644 +index 17d13d7c..2a7206ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -36,7 +36,7 @@ endif() - if(PACKAGE) - # this needs to be set before project() is called - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12) -- set(ASSETS ON) # necessary for packaging -+ set(ASSETS OFF) # necessary for packaging - message(STATUS "Building Extempore for binary distribution (assets directory will be downloaded)") - endif() +@@ -1,9 +1,6 @@ + cmake_minimum_required(VERSION 3.1) # we use target_sources() + project(Extempore VERSION 0.8.9) -@@ -134,71 +134,6 @@ else() +-# for backwards compatibility with CMake older than 3.19 +-cmake_policy(SET CMP0114 OLD) +- + option(ASSETS "download multimedia assets (approx 500MB)" OFF) + option(BUILD_TESTS "build test targets (including examples)" ON) + option(PACKAGE "set up install targets for packaging" OFF) +@@ -142,55 +139,6 @@ else() message(FATAL_ERROR "Sorry, Extempore isn't supported on this platform - macOS, Linux & Windows only.") endif() @@ -51,90 +59,224 @@ index 89e6125e..c5e90750 100644 -# portaudio # -############# - --add_library(portaudio STATIC -- src/portaudio/src/common/pa_allocation.c -- src/portaudio/src/common/pa_allocation.h -- src/portaudio/src/common/pa_converters.c -- src/portaudio/src/common/pa_converters.h -- src/portaudio/src/common/pa_cpuload.c -- src/portaudio/src/common/pa_cpuload.h -- src/portaudio/src/common/pa_debugprint.c -- src/portaudio/src/common/pa_debugprint.h -- src/portaudio/src/common/pa_dither.c -- src/portaudio/src/common/pa_dither.h -- src/portaudio/src/common/pa_endianness.h -- src/portaudio/src/common/pa_front.c -- src/portaudio/src/common/pa_hostapi.h -- src/portaudio/src/common/pa_memorybarrier.h -- src/portaudio/src/common/pa_process.c -- src/portaudio/src/common/pa_process.h -- src/portaudio/src/common/pa_ringbuffer.c -- src/portaudio/src/common/pa_ringbuffer.h -- src/portaudio/src/common/pa_stream.c -- src/portaudio/src/common/pa_stream.h -- src/portaudio/src/common/pa_trace.c -- src/portaudio/src/common/pa_trace.h -- src/portaudio/src/common/pa_types.h -- src/portaudio/src/common/pa_util.h -- ) +-include(ExternalProject) - --target_include_directories(portaudio -- PRIVATE src/portaudio/include -- PRIVATE src/portaudio/src/common) +-ExternalProject_Add(portaudio_static +- PREFIX portaudio +- URL https://github.com/PortAudio/portaudio/archive/3f7bee79a65327d2e0965e8a74299723ed6f072d.zip +- URL_MD5 182b76e05f6ef21d9f5716da7489905d +- CMAKE_ARGS +- -DPA_BUILD_STATIC=ON +- -DPA_BUILD_SHARED=OFF +- -DPA_LIBNAME_ADD_SUFFIX=OFF +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/portaudio) - - # platform-specific - - if(APPLE) -@@ -224,25 +159,8 @@ if(APPLE) + ############## + # LLVM 3.8.0 # + ############## +@@ -323,11 +271,6 @@ if(UNIX) + set_source_files_properties(src/Scheme.cpp PROPERTIES COMPILE_FLAGS -Wno-switch) + endif() - elseif(UNIX AND NOT APPLE) - # use ALSA on Linux -- target_sources(portaudio -- PRIVATE src/portaudio/src/hostapi/alsa/pa_linux_alsa.c -- PRIVATE src/portaudio/src/os/unix/pa_unix_hostapis.c -- PRIVATE src/portaudio/src/os/unix/pa_unix_util.c -- ) -- target_include_directories(portaudio -- PRIVATE src/portaudio/src/os/unix) -- target_compile_definitions(portaudio -- PRIVATE -DPA_USE_ALSA) -- target_link_libraries(portaudio -- PRIVATE asound) +-# static extempore build dependencies +- +-add_dependencies(extempore pcre) +-add_dependencies(extempore portaudio_static) +- + if(BUILD_LLVM) + if(WIN32) + add_dependencies(extempore LLVM-install) +@@ -342,12 +285,9 @@ endif() - if(JACK) -- target_sources(portaudio -- PRIVATE src/portaudio/src/hostapi/jack/pa_jack.c) -- target_compile_definitions(portaudio -- PRIVATE -DPA_USE_JACK) -- target_link_libraries(portaudio -- PRIVATE jack) - endif() + target_include_directories(extempore + PRIVATE +- src/pcre +- ${CMAKE_BINARY_DIR}/portaudio/include # installed by ExternalProject + ${EXT_LLVM_DIR}/include) - elseif(WIN32) -@@ -292,8 +210,6 @@ if(ASIO) +-target_link_directories(extempore PRIVATE ${CMAKE_BINARY_DIR}/portaudio/lib) +-target_link_libraries(extempore PRIVATE pcre portaudio${CMAKE_STATIC_LIBRARY_SUFFIX} ${LLVM_LIBRARIES}) ++target_link_libraries(extempore PRIVATE pcre portaudio ${LLVM_LIBRARIES}) + if(UNIX AND NOT APPLE) + target_link_libraries(extempore PRIVATE asound) endif() +@@ -425,7 +365,6 @@ elseif(APPLE) # macOS + PRIVATE "-framework AudioToolbox") - if(PACKAGE) -- target_compile_options(portaudio -- PRIVATE -mtune=generic) - endif() + elseif(UNIX AND NOT APPLE) # Linux +- set_property(TARGET pcre PROPERTY POSITION_INDEPENDENT_CODE ON) + set_property(TARGET extempore PROPERTY POSITION_INDEPENDENT_CODE ON) + # target_link_libraries(extempore PRIVATE --export-dynamic) + target_link_libraries(extempore PRIVATE dl) +@@ -529,7 +468,6 @@ else(WIN32) + DEPENDS ${filename} extempore) + set_target_properties(${targetname} PROPERTIES FOLDER AOT) + if(NOT ${group} STREQUAL "core") +- add_dependencies(${targetname} external_shlibs_${group}) + add_dependencies(aot_external_${group} ${targetname}) + endif() + foreach(dep ${ARGN}) +@@ -568,59 +506,6 @@ add_custom_target(clean_aot + if(UNIX) + if(EXTERNAL_SHLIBS_AUDIO) - ############## -@@ -411,8 +327,6 @@ endif() +- # first, download & build the shared libraries themselves (these are all external to Extempore) +- +- ExternalProject_Add(portmidi +- PREFIX portmidi +- URL https://github.com/extemporelang/portmidi/archive/8602f548f71daf5ef638b2f7d224753400cb2158.zip +- CMAKE_ARGS +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}) +- set_target_properties(portmidi PROPERTIES FOLDER EXTERNAL_SHLIBS) +- +- ExternalProject_Add(rtmidi +- PREFIX rtmidi +- URL https://github.com/thestk/rtmidi/archive/84d130bf22d878ff1b0e224346e2e0f9e3ba8099.zip +- URL_MD5 d932b9fef01b859a1b8b86a3c8dc6621 +- CMAKE_ARGS +- -DRTMIDI_BUILD_TESTING=OFF +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}) +- set_target_properties(rtmidi PROPERTIES FOLDER EXTERNAL_SHLIBS) +- +- ExternalProject_Add(kiss_fft +- PREFIX kiss_fft +- URL https://github.com/extemporelang/kiss_fft/archive/1.3.0.zip +- CMAKE_ARGS +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}) +- set_target_properties(kiss_fft PROPERTIES FOLDER EXTERNAL_SHLIBS) +- +- # build with as few deps as we can get away with +- +- ExternalProject_Add(sndfile +- PREFIX libsndfile +- URL https://github.com/erikd/libsndfile/archive/ae64caf9b5946d365971c550875000342e763de6.zip +- CMAKE_ARGS +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR} +- -DBUILD_SHARED_LIBS=ON +- -DBUILD_PROGRAMS=OFF +- -DBUILD_EXAMPLES=OFF +- -DENABLE_EXTERNAL_LIBS=OFF +- -DBUILD_TESTING=OFF +- -DENABLE_CPACK=OFF +- -DENABLE_PACKAGE_CONFIG=OFF) +- set_target_properties(sndfile PROPERTIES FOLDER EXTERNAL_SHLIBS) +- + add_custom_target(aot_external_audio ALL) + set_target_properties(aot_external_audio PROPERTIES FOLDER AOT) + aotcompile_lib(libs/external/fft.xtm audio base math) +@@ -629,76 +514,13 @@ if(UNIX) + aotcompile_lib(libs/external/instruments_ext.xtm audio base sndfile instruments) + aotcompile_lib(libs/external/portmidi.xtm audio base) + +- add_custom_target(external_shlibs_audio +- COMMENT "moving shared libs into ${EXT_PLATFORM_SHLIBS_DIR}" +- DEPENDS LLVM sndfile kiss_fft portmidi rtmidi +- COMMAND ${CMAKE_COMMAND} -E make_directory ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy libkiss_fft${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy libportmidi${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy librtmidi${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy libsndfile${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- WORKING_DIRECTORY ${EXT_DEPS_INSTALL_DIR}/lib) +- set_target_properties(external_shlibs_audio PROPERTIES FOLDER EXTERNAL_SHLIBS) +- + add_dependencies(aot_external_audio extempore) +- add_dependencies(aot_external_audio external_shlibs_audio) - # dependencies + endif(EXTERNAL_SHLIBS_AUDIO) --add_dependencies(extempore pcre portaudio) + if(EXTERNAL_SHLIBS_GRAPHICS) + +- ExternalProject_Add(nanovg +- PREFIX nanovg +- URL https://github.com/extemporelang/nanovg/archive/3c60175fcc2e5fe305b04355cdce35d499c80310.tar.gz +- CMAKE_ARGS +- -DEXTEMPORE_LIB_PATH=${CMAKE_SOURCE_DIR}/libs/platform-shlibs/extempore.lib +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}) +- set_target_properties(nanovg PROPERTIES FOLDER EXTERNAL_SHLIBS) - - if(BUILD_LLVM) - if(WIN32) - add_dependencies(extempore LLVM-install) -@@ -553,7 +467,7 @@ else() - install(TARGETS extempore - RUNTIME - DESTINATION ".") -- install(DIRECTORY assets runtime libs examples tests -+ install(DIRECTORY runtime libs examples - DESTINATION "." - PATTERN ".DS_Store" EXCLUDE) - endif() +- add_dependencies(nanovg extempore) +- +- ExternalProject_Add(stb_image +- PREFIX stb_image +- URL https://github.com/extemporelang/stb/archive/152a250a702bf28951bb0220d63bc0c99830c498.zip +- CMAKE_ARGS +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}) +- set_target_properties(nanovg PROPERTIES FOLDER EXTERNAL_SHLIBS) +- +- ExternalProject_Add(glfw3 +- PREFIX glfw3 +- URL https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip +- CMAKE_ARGS +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DBUILD_SHARED_LIBS=ON +- -DGLFW_BUILD_EXAMPLES=OFF +- -DGLFW_BUILD_TESTS=OFF +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}) +- set_target_properties(glfw3 PROPERTIES FOLDER EXTERNAL_SHLIBS) +- +- ExternalProject_Add(assimp +- PREFIX assimp +- URL https://github.com/assimp/assimp/archive/v3.2.zip +- CMAKE_ARGS +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_FLAGS=${EXT_DEPS_C_FLAGS} +- -DCMAKE_CXX_FLAGS=${EXT_DEPS_CXX_FLAGS} +- -DCMAKE_DEBUG_POSTFIX= +- -DASSIMP_BUILD_ASSIMP_TOOLS=OFF +- -DASSIMP_BUILD_SAMPLES=OFF +- -DASSIMP_BUILD_TESTS=OFF +- -DCMAKE_INSTALL_PREFIX=${EXT_DEPS_INSTALL_DIR}) +- set_target_properties(assimp PROPERTIES FOLDER EXTERNAL_SHLIBS) +- + add_custom_target(aot_external_graphics ALL) +- set_target_properties(assimp PROPERTIES FOLDER AOT) + + aotcompile_lib(libs/external/stb_image.xtm graphics base) + aotcompile_lib(libs/external/glfw3.xtm graphics base) +@@ -715,20 +537,8 @@ if(UNIX) + aotcompile_lib(libs/external/assimp.xtm graphics base stb_image graphics-pipeline) + aotcompile_lib(libs/external/gl/glcompat-${GL_BIND_METHOD}.xtm graphics base) + +- add_custom_target(external_shlibs_graphics +- COMMENT "moving shared libs into ${EXT_PLATFORM_SHLIBS_DIR}" +- DEPENDS LLVM assimp glfw3 stb_image nanovg +- COMMAND ${CMAKE_COMMAND} -E make_directory ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy libassimp${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy libglfw${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy libnanovg${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- COMMAND ${CMAKE_COMMAND} -E copy libstb_image${CMAKE_SHARED_LIBRARY_SUFFIX} ${EXT_PLATFORM_SHLIBS_DIR} +- WORKING_DIRECTORY ${EXT_DEPS_INSTALL_DIR}/lib) +- set_target_properties(external_shlibs_graphics PROPERTIES FOLDER EXTERNAL_SHLIBS) +- + # set up these libs for AOT compilation + add_dependencies(aot_external_graphics extempore) +- add_dependencies(aot_external_graphics external_shlibs_graphics) + + endif(EXTERNAL_SHLIBS_GRAPHICS) + endif(UNIX) +-- +2.32.0 + diff --git a/gnu/packages/patches/fp16-system-libraries.patch b/gnu/packages/patches/fp16-system-libraries.patch new file mode 100644 index 0000000000..7f52936c14 --- /dev/null +++ b/gnu/packages/patches/fp16-system-libraries.patch @@ -0,0 +1,105 @@ +This patch allows the build process to use the provided dependencies instead +of adding their source as CMake sub-directories (in which case "make install" +would install googletest's and googlebenchmark's libraries and headers). + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e7d127..4b269b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,7 +28,7 @@ MACRO(FP16_TARGET_ENABLE_CXX11 target) + ENDMACRO() + + # ---[ Download deps +-IF(NOT DEFINED PSIMD_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading PSimd to ${CMAKE_BINARY_DIR}/psimd-source (define PSIMD_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CMAKE_BINARY_DIR}/psimd-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -38,7 +38,7 @@ IF(NOT DEFINED PSIMD_SOURCE_DIR) + SET(PSIMD_SOURCE_DIR "${CMAKE_BINARY_DIR}/psimd-source" CACHE STRING "PSimd source directory") + ENDIF() + +-IF(FP16_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Test to ${CMAKE_BINARY_DIR}/googletest-source (define GOOGLETEST_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -48,7 +48,7 @@ IF(FP16_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) + SET(GOOGLETEST_SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-source" CACHE STRING "Google Test source directory") + ENDIF() + +-IF(FP16_BUILD_BENCHMARKS AND NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Benchmark to ${CMAKE_BINARY_DIR}/googlebenchmark-source (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CMAKE_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -84,22 +84,7 @@ INSTALL(FILES + include/fp16/avx2.py + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fp16) + +-# ---[ Configure psimd +-IF(NOT TARGET psimd) +- ADD_SUBDIRECTORY( +- "${PSIMD_SOURCE_DIR}" +- "${CMAKE_BINARY_DIR}/psimd") +-ENDIF() +- + IF(FP16_BUILD_TESTS) +- # ---[ Build google test +- IF(NOT TARGET gtest) +- SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- ADD_SUBDIRECTORY( +- "${GOOGLETEST_SOURCE_DIR}" +- "${CMAKE_BINARY_DIR}/googletest") +- ENDIF() +- + # ---[ Build FP16 unit tests + ADD_EXECUTABLE(ieee-to-fp32-bits-test test/ieee-to-fp32-bits.cc test/tables.cc) + TARGET_INCLUDE_DIRECTORIES(ieee-to-fp32-bits-test PRIVATE test) +@@ -137,40 +122,32 @@ IF(FP16_BUILD_TESTS) + ENDIF() + + IF(FP16_BUILD_BENCHMARKS) +- # ---[ Build google benchmark +- IF(NOT TARGET benchmark) +- SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "") +- ADD_SUBDIRECTORY( +- "${GOOGLEBENCHMARK_SOURCE_DIR}" +- "${CMAKE_BINARY_DIR}/googlebenchmark") +- ENDIF() +- + # ---[ Build FP16 benchmarks + ADD_EXECUTABLE(ieee-element-bench bench/ieee-element.cc) + TARGET_COMPILE_DEFINITIONS(ieee-element-bench PRIVATE FP16_COMPARATIVE_BENCHMARKS=1) + TARGET_INCLUDE_DIRECTORIES(ieee-element-bench PRIVATE ${PROJECT_SOURCE_DIR}) +- TARGET_LINK_LIBRARIES(ieee-element-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(ieee-element-bench fp16 benchmark) + + ADD_EXECUTABLE(alt-element-bench bench/alt-element.cc) +- TARGET_LINK_LIBRARIES(alt-element-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(alt-element-bench fp16 benchmark) + + ADD_EXECUTABLE(from-ieee-array-bench bench/from-ieee-array.cc) + FP16_TARGET_ENABLE_CXX11(from-ieee-array-bench) + TARGET_COMPILE_DEFINITIONS(from-ieee-array-bench PRIVATE FP16_COMPARATIVE_BENCHMARKS=1) + TARGET_INCLUDE_DIRECTORIES(from-ieee-array-bench PRIVATE ${PROJECT_SOURCE_DIR}) +- TARGET_LINK_LIBRARIES(from-ieee-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(from-ieee-array-bench fp16 benchmark) + + ADD_EXECUTABLE(from-alt-array-bench bench/from-alt-array.cc) + FP16_TARGET_ENABLE_CXX11(from-alt-array-bench) +- TARGET_LINK_LIBRARIES(from-alt-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(from-alt-array-bench fp16 benchmark) + + ADD_EXECUTABLE(to-ieee-array-bench bench/to-ieee-array.cc) + FP16_TARGET_ENABLE_CXX11(to-ieee-array-bench) + TARGET_COMPILE_DEFINITIONS(to-ieee-array-bench PRIVATE FP16_COMPARATIVE_BENCHMARKS=1) + TARGET_INCLUDE_DIRECTORIES(to-ieee-array-bench PRIVATE ${PROJECT_SOURCE_DIR}) +- TARGET_LINK_LIBRARIES(to-ieee-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(to-ieee-array-bench fp16 benchmark) + + ADD_EXECUTABLE(to-alt-array-bench bench/to-alt-array.cc) + FP16_TARGET_ENABLE_CXX11(to-alt-array-bench) +- TARGET_LINK_LIBRARIES(to-alt-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(to-alt-array-bench fp16 benchmark) + ENDIF() diff --git a/gnu/packages/patches/fxdiv-system-libraries.patch b/gnu/packages/patches/fxdiv-system-libraries.patch new file mode 100644 index 0000000000..eecfaf7efc --- /dev/null +++ b/gnu/packages/patches/fxdiv-system-libraries.patch @@ -0,0 +1,44 @@ +This patch allows the build process to use the provided dependencies instead +of adding their source as CMake sub-directories (in which case "make install" +would install googletest's and googlebenchmark's libraries and headers). + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bcae6b5..ff6710d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,7 +21,7 @@ IF(FXDIV_BUILD_TESTS) + ENDIF() + + # ---[ Download deps +-IF(FXDIV_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Test to ${CMAKE_BINARY_DIR}/googletest-source (define GOOGLETEST_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -31,7 +31,7 @@ IF(FXDIV_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) + SET(GOOGLETEST_SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-source" CACHE STRING "Google Test source directory") + ENDIF() + +-IF(FXDIV_BUILD_BENCHMARKS AND NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Benchmark to ${CMAKE_BINARY_DIR}/googlebenchmark-source (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CMAKE_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -54,7 +54,7 @@ INSTALL(FILES include/fxdiv.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + IF(FXDIV_BUILD_TESTS) + # ---[ Build google test +- IF(NOT TARGET gtest) ++ IF(FALSE) + SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + ADD_SUBDIRECTORY( + "${GOOGLETEST_SOURCE_DIR}" +@@ -78,7 +78,7 @@ ENDIF() + + IF(FXDIV_BUILD_BENCHMARKS) + # ---[ Build google benchmark +- IF(NOT TARGET benchmark) ++ IF(FALSE) + SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE) + ADD_SUBDIRECTORY( + "${GOOGLEBENCHMARK_SOURCE_DIR}" diff --git a/gnu/packages/patches/glade-gls-set-script-name.patch b/gnu/packages/patches/glade-gls-set-script-name.patch new file mode 100644 index 0000000000..61fbdf3914 --- /dev/null +++ b/gnu/packages/patches/glade-gls-set-script-name.patch @@ -0,0 +1,32 @@ +Taken from upstream: +https://gitlab.gnome.org/GNOME/glade/-/commit/eb0429d318c017b57b9e59de1d5b3f142a0f455e. + +From 6cf1d3e11d4f8035f33c3003d33f6465896025a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> +Date: Tue, 18 May 2021 19:54:50 +0200 +Subject: [PATCH] plugins: Define an invalid but non-null file path as script + path + +This is following the gjs applications behaviors, setting a valid string +as the script path that will be shown in JS stack traces, even though +won't load a real file through g_file_new_for_commandline_arg() +--- + plugins/gjs/glade-gjs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/gjs/glade-gjs.c b/plugins/gjs/glade-gjs.c +index e1779665..aeae9906 100644 +--- a/plugins/gjs/glade-gjs.c ++++ b/plugins/gjs/glade-gjs.c +@@ -93,7 +93,7 @@ glade_gjs_init (const gchar *name) + + /* Importing the module will create all the GTypes so that glade can use them at runtime */ + retval = gjs_context_eval (gjs_context_get_current (), +- import_sentence, -1, NULL, ++ import_sentence, -1, "<glade-gjs>", + &exit_status, + &error); + if (!retval && error) +-- +GitLab + diff --git a/gnu/packages/patches/glade-test-widget-null-icon.patch b/gnu/packages/patches/glade-test-widget-null-icon.patch new file mode 100644 index 0000000000..75668a2f68 --- /dev/null +++ b/gnu/packages/patches/glade-test-widget-null-icon.patch @@ -0,0 +1,30 @@ +Taken from upstream: +https://gitlab.gnome.org/GNOME/glade/-/commit/6cf1d3e11d4f8035f33c3003d33f6465896025a5. + +From eb0429d318c017b57b9e59de1d5b3f142a0f455e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> +Date: Wed, 19 May 2021 00:10:29 +0200 +Subject: [PATCH] tests: Do not create a file icon when no filename is provided + +This would fail otherwise as GFileIcon requires a GFile parameter on +construction. +--- + tests/create-widgets.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/create-widgets.c b/tests/create-widgets.c +index 2094059d..db8311f8 100644 +--- a/tests/create-widgets.c ++++ b/tests/create-widgets.c +@@ -106,6 +106,8 @@ main (int argc, + if (G_TYPE_IS_INSTANTIATABLE (adaptor_type) && !G_TYPE_IS_ABSTRACT (adaptor_type) && + /* FIXME: can not create a themed icon without a name */ + !g_type_is_a (adaptor_type, G_TYPE_THEMED_ICON) && ++ /* FIXME: can not create a file icon without a file name */ ++ !g_type_is_a (adaptor_type, G_TYPE_FILE_ICON) && + /* FIXME: GtkPopoverMenu gives a few warnings */ + !g_type_is_a (adaptor_type, GTK_TYPE_POPOVER_MENU) && + /* FIXME: GtkFileChooserNative is hard to test here */ +-- +GitLab + diff --git a/gnu/packages/patches/glib-networking-gnutls-binding.patch b/gnu/packages/patches/glib-networking-gnutls-binding.patch new file mode 100644 index 0000000000..91d0743056 --- /dev/null +++ b/gnu/packages/patches/glib-networking-gnutls-binding.patch @@ -0,0 +1,21 @@ +Skip failing test in 'test_connection_binding_match_tls_unique' +in 'tls/tests/connection.c' when building glib-networking against +GnuTLS 3.7.2. The failure stems from the fact that +'gnutls_session_channel_binding' returns GNUTLS_E_INVALID_REQUEST +is known upstream: + + https://gitlab.gnome.org/GNOME/glib-networking/-/issues/164 + +diff --git a/tls/tests/connection.c b/tls/tests/connection.c +index 036df04..347c7a4 100644 +--- a/tls/tests/connection.c ++++ b/tls/tests/connection.c +@@ -3037,8 +3037,6 @@ main (int argc, + setup_connection, test_connection_missing_server_identity, teardown_connection); + g_test_add ("/tls/" BACKEND "/connection/peer-certificate-notify", TestConnection, NULL, + setup_connection, test_peer_certificate_notify, teardown_connection); +- g_test_add ("/tls/" BACKEND "/connection/binding/match-tls-unique", TestConnection, NULL, +- setup_connection, test_connection_binding_match_tls_unique, teardown_connection); + g_test_add ("/tls/" BACKEND "/connection/binding/match-tls-server-end-point", TestConnection, NULL, + setup_connection, test_connection_binding_match_tls_server_end_point, teardown_connection); + g_test_add ("/tls/" BACKEND "/connection/binding/match-tls-exporter", TestConnection, NULL, diff --git a/gnu/packages/patches/glibc-bootstrap-system.patch b/gnu/packages/patches/glibc-bootstrap-system.patch index fcaf17132d..9c0fac3ff5 100644 --- a/gnu/packages/patches/glibc-bootstrap-system.patch +++ b/gnu/packages/patches/glibc-bootstrap-system.patch @@ -14,7 +14,7 @@ index ebc381ed7c..e0d3ed1bc3 100644 } - if (__posix_spawn (&((_IO_proc_file *) fp)->pid, _PATH_BSHELL, fa, 0, -+ if (posix_spawnp (&((_IO_proc_file *) fp)->pid, "sh", fa, 0, ++ if (__posix_spawnp (&((_IO_proc_file *) fp)->pid, "sh", fa, 0, (char *const[]){ (char*) "sh", (char*) "-c", (char *) command, NULL }, __environ) != 0) return false; @@ -36,7 +36,31 @@ index a03f478fc7..94da6facf3 100644 POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK); - ret = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr, -+ ret = posix_spawnp (&pid, SHELL_NAME, 0, &spawn_attr, ++ ret = __posix_spawnp (&pid, SHELL_NAME, 0, &spawn_attr, (char *const[]){ (char *) SHELL_NAME, (char *) "-c", (char *) line, NULL }, + +--- a/include/spawn.h ++++ b/include/spawn.h +@@ -5,6 +5,9 @@ + __typeof (posix_spawn) __posix_spawn; + libc_hidden_proto (__posix_spawn) + ++__typeof (posix_spawnp) __posix_spawnp; ++libc_hidden_proto (__posix_spawnp) ++ + __typeof (posix_spawn_file_actions_addclose) + __posix_spawn_file_actions_addclose attribute_hidden; + +--- a/posix/spawnp.c ++++ b/posix/spawnp.c +@@ -31,6 +31,7 @@ __posix_spawnp (pid_t *pid, const char *file, + SPAWN_XFLAGS_USE_PATH); + } + versioned_symbol (libc, __posix_spawnp, posix_spawnp, GLIBC_2_15); ++libc_hidden_def (__posix_spawnp) + + + #if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_15) + diff --git a/gnu/packages/patches/glibc-skip-c++.patch b/gnu/packages/patches/glibc-skip-c++.patch new file mode 100644 index 0000000000..b2cbe76d3b --- /dev/null +++ b/gnu/packages/patches/glibc-skip-c++.patch @@ -0,0 +1,31 @@ +When building, say, glibc 2.31 using a compiler that's itself linked +against 2.33, linking fails with: + + gcc -Wl,-rpath-link=/tmp/guix-build-glibc-2.31.drv-0/build:/tmp/guix-build-glibc-2.31.drv-0/build/math:/tmp/guix-build-glibc-2.31.drv-0/build/elf:/tmp/guix-build-glibc-2.31.drv-0/build/dlfcn:/tmp/guix-build-glibc-2.31.drv-0/build/nss:/tmp/guix-build-glibc-2.31.drv-0/build/nis:/tmp/guix-build-glibc-2.31.drv-0/build/rt:/tmp/guix-build-glibc-2.31.drv-0/build/resolv:/tmp/guix-build-glibc-2.31.drv-0/build/mathvec:/tmp/guix-build-glibc-2.31.drv-0/build/support:/tmp/guix-build-glibc-2.31.drv-0/build/crypt:/tmp/guix-build-glibc-2.31.drv-0/build/nptl -nostdlib -nostartfiles -o /tmp/guix-build-glibc-2.31.drv-0/build/support/links-dso-program -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /tmp/guix-build-glibc-2.31.drv-0/build/csu/crt1.o /tmp/guix-build-glibc-2.31.drv-0/build/csu/crti.o `gcc --print-file-name=crtbegin.o` /tmp/guix-build-glibc-2.31.drv-0/build/support/links-dso-program.o -lstdc++ -lgcc -lgcc_s -Wl,-dynamic-linker=/gnu/store/...-glibc-2.31/lib/ld-linux-x86-64.so.2 /tmp/guix-build-glibc-2.31.drv-0/build/libc.so.6 /tmp/guix-build-glibc-2.31.drv-0/build/libc_nonshared.a -Wl,--as-needed /tmp/guix-build-glibc-2.31.drv-0/build/elf/ld.so -Wl,--no-as-needed -lgcc `gcc --print-file-name=crtend.o` /tmp/guix-build-glibc-2.31.drv-0/build/csu/crtn.o + ld: /gnu/store/...-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../libstdc++.so: undefined reference to `fstat64@GLIBC_2.33' + ld: /gnu/store/...-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../libstdc++.so: undefined reference to `lstat@GLIBC_2.33' + ld: /gnu/store/...-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../libstdc++.so: undefined reference to `stat@GLIBC_2.33' + collect2: error: ld returned 1 exit status + +This is unsurprising given that libstdc++.so here is linked against 2.33, +whereas libc.so.6 here is 2.31. + +This patch works around it by not building the offending program. + +diff --git a/support/Makefile b/support/Makefile +index bb9889ef..6614943b 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -210,12 +210,7 @@ CFLAGS-support_paths.c = \ + # -fexcess-precision=standard. + CFLAGS-timespec.c += -fexcess-precision=standard + +-ifeq (,$(CXX)) + LINKS_DSO_PROGRAM = links-dso-program-c +-else +-LINKS_DSO_PROGRAM = links-dso-program +-LDLIBS-links-dso-program = -lstdc++ -lgcc -lgcc_s $(libunwind) +-endif + + ifeq (yes,$(have-selinux)) + LDLIBS-$(LINKS_DSO_PROGRAM) += -lselinux diff --git a/gnu/packages/patches/glibc-static-nss.patch b/gnu/packages/patches/glibc-static-nss.patch new file mode 100644 index 0000000000..1a9db616cc --- /dev/null +++ b/gnu/packages/patches/glibc-static-nss.patch @@ -0,0 +1,1244 @@ +This patch reinstates support for static NSS, which glibc 2.33 broke: + + https://sourceware.org/bugzilla/show_bug.cgi?id=27959 + +Patch obtained by running: + + git diff f0c28504a9877be5da3ed1215f2da2d5914bbb0b..f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf + git diff 5e1ce61e3e71fb7ffe53f58fe96e67cb15f94854{^,} + git diff 135425a1dd50cbe2b9db0628d6c2b36c7889f30b{^,} + +It corresponds to these changes: + + f9c8b11ed7 * nss: Access nss_files through direct references + 6212bb67f4 * nss_files: Move into libc + 36861a968a * nss_files: Add generic code for set*ent, end*ent and file open + f0c28504a9 * nss_files: Allocate nscd file registration data on the heap + 5e1ce61e3e * nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrent + 135425a1dd * nss: Fix build error with --disable-nscd + +... plus a manual fix in 'files-network.c' to address this compilation error: + + nss_files/files-network.c: In function ‘_nss_files_parse_netent’: + nss_files/files-network.c:72:20: error: implicit declaration of function ‘__inet_network’; did you mean ‘inet_network’? [-Werror=implicit-function-declaration] + 72 | result->n_net = __inet_network (addr); + | ^~~~~~~~~~~~~~ + nss_files/files-parse.c:106:3: note: in definition of macro ‘LINE_PARSER’ + 106 | BODY; \ + | ^~~~ + +diff --git a/include/libc-symbols.h b/include/libc-symbols.h +index 127ea656c2..d41ecf4384 100644 +--- a/include/libc-symbols.h ++++ b/include/libc-symbols.h +@@ -798,29 +798,6 @@ for linking") + # define libdl_hidden_data_ver(local, name) + #endif + +-#if IS_IN (libnss_files) +-# define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) +-# define libnss_files_hidden_tls_proto(name, attrs...) \ +- hidden_tls_proto (name, ##attrs) +-# define libnss_files_hidden_def(name) hidden_def (name) +-# define libnss_files_hidden_weak(name) hidden_weak (name) +-# define libnss_files_hidden_ver(local, name) hidden_ver (local, name) +-# define libnss_files_hidden_data_def(name) hidden_data_def (name) +-# define libnss_files_hidden_tls_def(name) hidden_tls_def (name) +-# define libnss_files_hidden_data_weak(name) hidden_data_weak (name) +-# define libnss_files_hidden_data_ver(local, name) hidden_data_ver(local, name) +-#else +-# define libnss_files_hidden_proto(name, attrs...) +-# define libnss_files_hidden_tls_proto(name, attrs...) +-# define libnss_files_hidden_def(name) +-# define libnss_files_hidden_weak(name) +-# define libnss_files_hidden_ver(local, name) +-# define libnss_files_hidden_data_def(name) +-# define libnss_files_hidden_tls_def(name) +-# define libnss_files_hidden_data_weak(name) +-# define libnss_files_hidden_data_ver(local, name) +-#endif +- + #if IS_IN (libnsl) + # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) + # define libnsl_hidden_tls_proto(name, attrs...) \ +diff --git a/include/netdb.h b/include/netdb.h +index 82e102ff76..4dcdbb8cd4 100644 +--- a/include/netdb.h ++++ b/include/netdb.h +@@ -217,7 +217,7 @@ extern enum nss_status _nss_netgroup_parseline (char **cursor, + struct __netgrent *result, + char *buffer, size_t buflen, + int *errnop); +-libnss_files_hidden_proto (_nss_netgroup_parseline) ++libc_hidden_proto (_nss_netgroup_parseline) + + #define DECLARE_NSS_PROTOTYPES(service) \ + extern enum nss_status _nss_ ## service ## _setprotoent (int); \ +diff --git a/include/nss_files.h b/include/nss_files.h +index 6a0dcdb85b..6190cac6be 100644 +--- a/include/nss_files.h ++++ b/include/nss_files.h +@@ -19,7 +19,11 @@ + #ifndef _NSS_FILES_H + #define _NSS_FILES_H + ++#include <nss.h> + #include <stdio.h> ++#if IS_IN (libc) ++#include <libc-lock.h> ++#endif + + /* Open PATH for reading, as a data source for nss_files. */ + FILE *__nss_files_fopen (const char *path); +@@ -47,6 +51,63 @@ int __nss_readline_seek (FILE *fp, off64_t offset) attribute_hidden; + int __nss_parse_line_result (FILE *fp, off64_t offset, int parse_line_result); + libc_hidden_proto (__nss_parse_line_result) + ++/* Per-file data. Used by the *ent functions that need to preserve ++ state across calls. */ ++struct nss_files_per_file_data ++{ ++ FILE *stream; ++#if IS_IN (libc) ++ /* The size of locks changes between libc and nss_files, so this ++ member must be last and is only available in libc. */ ++ __libc_lock_define (, lock); ++#endif ++}; ++ ++/* File index for __nss_files_data_get. */ ++enum nss_files_file ++ { ++ nss_file_aliasent, ++ nss_file_etherent, ++ nss_file_grent, ++ nss_file_hostent, ++ nss_file_netent, ++ nss_file_protoent, ++ nss_file_pwent, ++ nss_file_rpcent, ++ nss_file_servent, ++ nss_file_sgent, ++ nss_file_spent, ++ ++ nss_file_count ++ }; ++ ++/* Obtains a pointer to the per-file data for FILE, which is written ++ to *PDATA, and tries to open the file at PATH for it. On success, ++ returns NSS_STATUS_SUCCESS, and the caller must later call ++ __nss_files_data_put. On failure, NSS_STATUS_TRYAGAIN is returned, ++ and *ERRNOP and *HERRNOP are updated if these pointers are not ++ null. */ ++enum nss_status __nss_files_data_open (struct nss_files_per_file_data **pdata, ++ enum nss_files_file file, ++ const char *path, ++ int *errnop, int *herrnop); ++libc_hidden_proto (__nss_files_data_open) ++ ++/* Unlock the per-file data, previously obtained by ++ __nss_files_data_open. */ ++void __nss_files_data_put (struct nss_files_per_file_data *data); ++libc_hidden_proto (__nss_files_data_put) ++ ++/* Performs the set*ent operation for FILE. PATH is the file to ++ open. */ ++enum nss_status __nss_files_data_setent (enum nss_files_file file, ++ const char *path); ++libc_hidden_proto (__nss_files_data_setent) ++ ++/* Performs the end*ent operation for FILE. */ ++enum nss_status __nss_files_data_endent (enum nss_files_file file); ++libc_hidden_proto (__nss_files_data_endent) ++ + struct parser_data; + + /* Instances of the parse_line function from +@@ -64,16 +125,25 @@ extern nss_files_parse_line _nss_files_parse_servent; + extern nss_files_parse_line _nss_files_parse_sgent; + extern nss_files_parse_line _nss_files_parse_spent; + +-libnss_files_hidden_proto (_nss_files_parse_etherent) ++libc_hidden_proto (_nss_files_parse_etherent) + libc_hidden_proto (_nss_files_parse_grent) +-libnss_files_hidden_proto (_nss_files_parse_netent) +-libnss_files_hidden_proto (_nss_files_parse_protoent) ++libc_hidden_proto (_nss_files_parse_netent) ++libc_hidden_proto (_nss_files_parse_protoent) + libc_hidden_proto (_nss_files_parse_pwent) +-libnss_files_hidden_proto (_nss_files_parse_rpcent) +-libnss_files_hidden_proto (_nss_files_parse_servent) ++libc_hidden_proto (_nss_files_parse_rpcent) ++libc_hidden_proto (_nss_files_parse_servent) + libc_hidden_proto (_nss_files_parse_sgent) + libc_hidden_proto (_nss_files_parse_spent) + ++NSS_DECLARE_MODULE_FUNCTIONS (files) ++#undef DEFINE_NSS_FUNCTION ++#define DEFINE_NSS_FUNCTION(x) libc_hidden_proto (_nss_files_##x) ++#include <nss/function.def> ++#undef DEFINE_NSS_FUNCTION ++ ++void _nss_files_init (void (*cb) (size_t, struct traced_file *)); ++libc_hidden_proto (_nss_files_init) ++ + /* Generic implementation of fget*ent_r. Reads lines from FP until + EOF or a successful parse into *RESULT using PARSER. Returns 0 on + success, ENOENT on EOF, ERANGE on too-small buffer. */ +diff --git a/nss/Makefile b/nss/Makefile +index 9682a31e20..63a386af18 100644 +--- a/nss/Makefile ++++ b/nss/Makefile +@@ -31,7 +31,8 @@ routines = nsswitch getnssent getnssent_r digits_dots \ + compat-lookup nss_hash nss_files_fopen \ + nss_readline nss_parse_line_result \ + nss_fgetent_r nss_module nss_action \ +- nss_action_parse nss_database ++ nss_action_parse nss_database nss_files_data \ ++ nss_files_functions + + # These are the databases that go through nss dispatch. + # Caution: if you add a database here, you must add its real name +@@ -98,9 +99,11 @@ subdir-dirs = $(services:%=nss_%) + vpath %.c $(subdir-dirs) ../locale/programs ../intl + + +-libnss_files-routines := $(addprefix files-, \ +- $(filter-out key, $(databases))) \ +- files-initgroups files-init ++routines += \ ++ $(addprefix files-, $(filter-out key, $(databases))) \ ++ files-init \ ++ files-initgroups \ ++ # routines + + libnss_db-dbs := $(addprefix db-,\ + $(filter-out hosts network key alias,\ +@@ -116,12 +119,9 @@ libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) \ + install-others += $(inst_vardbdir)/Makefile + + # Build static module into libc if requested +-libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes)) + libnss_db-inhibit-o = $(filter-out .os,$(object-suffixes)) + libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) + ifeq ($(build-static-nss),yes) +-routines += $(libnss_files-routines) +-static-only-routines += $(libnss_files-routines) + tests-static += tst-nss-static + endif + extra-test-objs += nss_test1.os nss_test2.os +@@ -138,8 +138,6 @@ libnss-libc = $(common-objpfx)linkobj/libc.so + # for new links: + $(services:%=$(objpfx)libnss_%.so): libc-for-link = $(libnss-libc) + +-$(objpfx)libnss_db.so: $(objpfx)libnss_files.so +- + $(libnss_db-dbs:%=$(objpfx)%.c): $(objpfx)db-%.c: nss_files/files-%.c + @rm -f $@.new + (echo '#define EXTERN_PARSER';\ +diff --git a/nss/Versions b/nss/Versions +index fdddea104c..e551524aa9 100644 +--- a/nss/Versions ++++ b/nss/Versions +@@ -19,11 +19,12 @@ libc { + __nss_services_lookup2; __nss_next2; __nss_lookup; + __nss_hash; __nss_database_get; + __nss_files_fopen; __nss_readline; __nss_parse_line_result; +- } +-} ++ __nss_files_data_endent; ++ __nss_files_data_open; ++ __nss_files_data_put; ++ __nss_files_data_setent; + +-libnss_files { +- GLIBC_PRIVATE { ++ # Routines formerly in libnss_files.so.2. + _nss_files_setaliasent; + _nss_files_endaliasent; + _nss_files_getaliasbyname_r; +@@ -109,6 +110,14 @@ libnss_files { + } + } + ++libnss_files { ++ GLIBC_PRIVATE { ++ # Keep a version node (with a synthesized local: * directive) so that ++ # __bss_* symbols are hidden on targets that need it. ++ __libnss_files_version_placeholder; ++ } ++} ++ + libnss_db { + GLIBC_PRIVATE { + _nss_db_setetherent; +diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c +index b4b989d9bb..c158a891bd 100644 +--- a/nss/nss_files/files-XXX.c ++++ b/nss/nss_files/files-XXX.c +@@ -45,10 +45,12 @@ + # include <netdb.h> + # define H_ERRNO_PROTO , int *herrnop + # define H_ERRNO_ARG , herrnop ++# define H_ERRNO_ARG_OR_NULL herrnop + # define H_ERRNO_SET(val) (*herrnop = (val)) + #else + # define H_ERRNO_PROTO + # define H_ERRNO_ARG ++# define H_ERRNO_ARG_OR_NULL NULL + # define H_ERRNO_SET(val) ((void) 0) + #endif + +@@ -58,15 +60,11 @@ + # define EXTRA_ARGS_VALUE + #endif + +-/* Locks the static variables in this file. */ +-__libc_lock_define_initialized (static, lock) + + /* Maintenance of the stream open on the database file. For getXXent + operations the stream needs to be held open across calls, the other + getXXbyYY operations all use their own stream. */ + +-static FILE *stream; +- + /* Open database file if not already opened. */ + static enum nss_status + internal_setent (FILE **stream) +@@ -91,42 +89,16 @@ internal_setent (FILE **stream) + enum nss_status + CONCAT(_nss_files_set,ENTNAME) (int stayopen) + { +- enum nss_status status; +- +- __libc_lock_lock (lock); +- +- status = internal_setent (&stream); +- +- __libc_lock_unlock (lock); +- +- return status; ++ return __nss_files_data_setent (CONCAT (nss_file_, ENTNAME), DATAFILE); + } ++libc_hidden_def (CONCAT (_nss_files_set,ENTNAME)) + +- +-/* Close the database file. */ +-static void +-internal_endent (FILE **stream) +-{ +- if (*stream != NULL) +- { +- fclose (*stream); +- *stream = NULL; +- } +-} +- +- +-/* Thread-safe, exported version of that. */ + enum nss_status + CONCAT(_nss_files_end,ENTNAME) (void) + { +- __libc_lock_lock (lock); +- +- internal_endent (&stream); +- +- __libc_lock_unlock (lock); +- +- return NSS_STATUS_SUCCESS; ++ return __nss_files_data_endent (CONCAT (nss_file_, ENTNAME)); + } ++libc_hidden_def (CONCAT (_nss_files_end,ENTNAME)) + + + /* Parsing the database file into `struct STRUCTURE' data structures. */ +@@ -194,28 +166,22 @@ CONCAT(_nss_files_get,ENTNAME_r) (struct STRUCTURE *result, char *buffer, + size_t buflen, int *errnop H_ERRNO_PROTO) + { + /* Return next entry in host file. */ +- enum nss_status status = NSS_STATUS_SUCCESS; +- +- __libc_lock_lock (lock); + +- /* Be prepared that the set*ent function was not called before. */ +- if (stream == NULL) +- { +- int save_errno = errno; +- +- status = internal_setent (&stream); +- +- __set_errno (save_errno); +- } +- +- if (status == NSS_STATUS_SUCCESS) +- status = internal_getent (stream, result, buffer, buflen, errnop +- H_ERRNO_ARG EXTRA_ARGS_VALUE); ++ struct nss_files_per_file_data *data; ++ enum nss_status status = __nss_files_data_open (&data, ++ CONCAT (nss_file_, ENTNAME), ++ DATAFILE, ++ errnop, H_ERRNO_ARG_OR_NULL); ++ if (status != NSS_STATUS_SUCCESS) ++ return status; + +- __libc_lock_unlock (lock); ++ status = internal_getent (data->stream, result, buffer, buflen, errnop ++ H_ERRNO_ARG EXTRA_ARGS_VALUE); + ++ __nss_files_data_put (data); + return status; + } ++libc_hidden_def (CONCAT (_nss_files_get,ENTNAME_r)) + + /* Macro for defining lookup functions for this file-based database. + +@@ -248,8 +214,9 @@ _nss_files_get##name##_r (proto, \ + == NSS_STATUS_SUCCESS) \ + { break_if_match } \ + \ +- internal_endent (&stream); \ ++ fclose (stream); \ + } \ + \ + return status; \ +-} ++} \ ++libc_hidden_def (_nss_files_get##name##_r) +diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c +index 30971bfe56..8c6e176ff6 100644 +--- a/nss/nss_files/files-alias.c ++++ b/nss/nss_files/files-alias.c +@@ -31,18 +31,11 @@ + #include "nsswitch.h" + #include <nss_files.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- +-/* Locks the static variables in this file. */ +-__libc_lock_define_initialized (static, lock) + + /* Maintenance of the stream open on the database file. For getXXent + operations the stream needs to be held open across calls, the other + getXXbyYY operations all use their own stream. */ + +-static FILE *stream; +- +- + static enum nss_status + internal_setent (FILE **stream) + { +@@ -66,42 +59,16 @@ internal_setent (FILE **stream) + enum nss_status + _nss_files_setaliasent (void) + { +- enum nss_status status; +- +- __libc_lock_lock (lock); +- +- status = internal_setent (&stream); +- +- __libc_lock_unlock (lock); +- +- return status; ++ return __nss_files_data_setent (nss_file_aliasent, "/etc/aliases"); + } ++libc_hidden_def (_nss_files_setaliasent) + +- +-/* Close the database file. */ +-static void +-internal_endent (FILE **stream) +-{ +- if (*stream != NULL) +- { +- fclose (*stream); +- *stream = NULL; +- } +-} +- +- +-/* Thread-safe, exported version of that. */ + enum nss_status + _nss_files_endaliasent (void) + { +- __libc_lock_lock (lock); +- +- internal_endent (&stream); +- +- __libc_lock_unlock (lock); +- +- return NSS_STATUS_SUCCESS; ++ return __nss_files_data_endent (nss_file_aliasent); + } ++libc_hidden_def (_nss_files_endaliasent) + + /* Parsing the database file into `struct aliasent' data structures. */ + static enum nss_status +@@ -131,7 +98,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, + /* Read the first line. It must contain the alias name and + possibly some alias names. */ + first_unused[room_left - 1] = '\xff'; +- line = fgets_unlocked (first_unused, room_left, stream); ++ line = __fgets_unlocked (first_unused, room_left, stream); + if (line == NULL) + /* Nothing to read. */ + break; +@@ -220,7 +187,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, + /* If the file does not exist we simply ignore + the statement. */ + if (listfile != NULL +- && (old_line = strdup (line)) != NULL) ++ && (old_line = __strdup (line)) != NULL) + { + while (! feof_unlocked (listfile)) + { +@@ -232,8 +199,8 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, + } + + first_unused[room_left - 1] = '\xff'; +- line = fgets_unlocked (first_unused, room_left, +- listfile); ++ line = __fgets_unlocked (first_unused, room_left, ++ listfile); + if (line == NULL) + break; + if (first_unused[room_left - 1] != '\xff') +@@ -335,7 +302,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, + /* The just read character is a white space and so + can be ignored. */ + first_unused[room_left - 1] = '\xff'; +- line = fgets_unlocked (first_unused, room_left, stream); ++ line = __fgets_unlocked (first_unused, room_left, stream); + if (line == NULL) + { + /* Continuation line without any data and +@@ -369,29 +336,25 @@ _nss_files_getaliasent_r (struct aliasent *result, char *buffer, size_t buflen, + int *errnop) + { + /* Return next entry in host file. */ +- enum nss_status status = NSS_STATUS_SUCCESS; + +- __libc_lock_lock (lock); +- +- /* Be prepared that the set*ent function was not called before. */ +- if (stream == NULL) +- status = internal_setent (&stream); +- +- if (status == NSS_STATUS_SUCCESS) +- { +- result->alias_local = 1; ++ struct nss_files_per_file_data *data; ++ enum nss_status status = __nss_files_data_open (&data, nss_file_aliasent, ++ "/etc/aliases", errnop, NULL); ++ if (status != NSS_STATUS_SUCCESS) ++ return status; + +- /* Read lines until we get a definite result. */ +- do +- status = get_next_alias (stream, NULL, result, buffer, buflen, errnop); +- while (status == NSS_STATUS_RETURN); +- } ++ result->alias_local = 1; + +- __libc_lock_unlock (lock); ++ /* Read lines until we get a definite result. */ ++ do ++ status = get_next_alias (data->stream, NULL, result, buffer, buflen, ++ errnop); ++ while (status == NSS_STATUS_RETURN); + ++ __nss_files_data_put (data); + return status; + } +- ++libc_hidden_def (_nss_files_getaliasent_r) + + enum nss_status + _nss_files_getaliasbyname_r (const char *name, struct aliasent *result, +@@ -418,9 +381,10 @@ _nss_files_getaliasbyname_r (const char *name, struct aliasent *result, + do + status = get_next_alias (stream, name, result, buffer, buflen, errnop); + while (status == NSS_STATUS_RETURN); +- } + +- internal_endent (&stream); ++ fclose (stream); ++ } + + return status; + } ++libc_hidden_def (_nss_files_getaliasbyname_r) +diff --git a/nss/nss_files/files-ethers.c b/nss/nss_files/files-ethers.c +index 2fe7f81e4b..7c2c2b9833 100644 +--- a/nss/nss_files/files-ethers.c ++++ b/nss/nss_files/files-ethers.c +@@ -20,8 +20,6 @@ + #include <netinet/if_ether.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + struct etherent_data {}; + + #define ENTNAME etherent +diff --git a/nss/nss_files/files-grp.c b/nss/nss_files/files-grp.c +index 49be38e8b1..a716d948e2 100644 +--- a/nss/nss_files/files-grp.c ++++ b/nss/nss_files/files-grp.c +@@ -19,8 +19,6 @@ + #include <grp.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define STRUCTURE group + #define ENTNAME grent + #define DATABASE "group" +diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c +index 2b47ec3e53..d54d91d038 100644 +--- a/nss/nss_files/files-hosts.c ++++ b/nss/nss_files/files-hosts.c +@@ -26,8 +26,6 @@ + #include <alloc_buffer.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + /* Get implementation for some internal functions. */ + #include "../resolv/res_hconf.h" + +@@ -57,12 +55,13 @@ LINE_PARSER + STRING_FIELD (addr, isspace, 1); + + /* Parse address. */ +- if (inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr) ++ if (__inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr) + > 0) + af = af == AF_UNSPEC ? AF_INET : af; + else + { +- if (af == AF_INET && inet_pton (AF_INET6, addr, entdata->host_addr) > 0) ++ if (af == AF_INET ++ && __inet_pton (AF_INET6, addr, entdata->host_addr) > 0) + { + if (IN6_IS_ADDR_V4MAPPED (entdata->host_addr)) + memcpy (entdata->host_addr, entdata->host_addr + 12, INADDRSZ); +@@ -76,7 +75,7 @@ LINE_PARSER + return 0; + } + else if (af == AF_UNSPEC +- && inet_pton (AF_INET6, addr, entdata->host_addr) > 0) ++ && __inet_pton (AF_INET6, addr, entdata->host_addr) > 0) + af = AF_INET6; + else + /* Illegal address: ignore line. */ +@@ -349,7 +348,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result, + status = gethostbyname3_multi + (stream, name, af, result, buffer, buflen, errnop, herrnop); + +- internal_endent (&stream); ++ fclose (stream); + } + + if (canonp && status == NSS_STATUS_SUCCESS) +@@ -357,6 +356,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result, + + return status; + } ++libc_hidden_def (_nss_files_gethostbyname3_r) + + enum nss_status + _nss_files_gethostbyname_r (const char *name, struct hostent *result, +@@ -366,6 +366,7 @@ _nss_files_gethostbyname_r (const char *name, struct hostent *result, + return _nss_files_gethostbyname3_r (name, AF_INET, result, buffer, buflen, + errnop, herrnop, NULL, NULL); + } ++libc_hidden_def (_nss_files_gethostbyname_r) + + enum nss_status + _nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result, +@@ -375,6 +376,7 @@ _nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result, + return _nss_files_gethostbyname3_r (name, af, result, buffer, buflen, + errnop, herrnop, NULL, NULL); + } ++libc_hidden_def (_nss_files_gethostbyname2_r) + + enum nss_status + _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat, +@@ -475,7 +477,7 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat, + status = NSS_STATUS_SUCCESS; + } + +- internal_endent (&stream); ++ fclose (stream); + } + else if (status == NSS_STATUS_TRYAGAIN) + { +@@ -490,3 +492,4 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat, + + return status; + } ++libc_hidden_def (_nss_files_gethostbyname4_r) +diff --git a/nss/nss_files/files-init.c b/nss/nss_files/files-init.c +index 717c9fd334..18ed288d04 100644 +--- a/nss/nss_files/files-init.c ++++ b/nss/nss_files/files-init.c +@@ -21,8 +21,7 @@ + #include <string.h> + #include <nscd/nscd.h> + #include <nss.h> +- +-NSS_DECLARE_MODULE_FUNCTIONS (files) ++#include <nss_files.h> + + static void + register_file (void (*cb) (size_t, struct traced_file *), +@@ -49,5 +48,6 @@ _nss_files_init (void (*cb) (size_t, struct traced_file *)) + register_file (cb, servdb, "/etc/services", 0); + register_file (cb, netgrdb, "/etc/netgroup", 0); + } ++libc_hidden_def (_nss_files_init) + + #endif +diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c +index 6fcea40b55..b44211e50b 100644 +--- a/nss/nss_files/files-initgroups.c ++++ b/nss/nss_files/files-initgroups.c +@@ -28,8 +28,6 @@ + #include <nss.h> + #include <nss_files.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + enum nss_status + _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start, + long int *size, gid_t **groupsp, long int limit, +@@ -129,3 +127,4 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start, + + return status == NSS_STATUS_SUCCESS && !any ? NSS_STATUS_NOTFOUND : status; + } ++libc_hidden_def (_nss_files_initgroups_dyn) +diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c +index f8c821c2f0..75bfbd9e44 100644 +--- a/nss/nss_files/files-netgrp.c ++++ b/nss/nss_files/files-netgrp.c +@@ -28,11 +28,9 @@ + #include "netgroup.h" + #include <nss_files.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define DATAFILE "/etc/netgroup" + +-libnss_files_hidden_proto (_nss_files_endnetgrent) ++libc_hidden_proto (_nss_files_endnetgrent) + + #define EXPAND(needed) \ + do \ +@@ -152,7 +150,7 @@ _nss_files_setnetgrent (const char *group, struct __netgrent *result) + + return status; + } +- ++libc_hidden_def (_nss_files_setnetgrent) + + enum nss_status + _nss_files_endnetgrent (struct __netgrent *result) +@@ -164,7 +162,7 @@ _nss_files_endnetgrent (struct __netgrent *result) + result->cursor = NULL; + return NSS_STATUS_SUCCESS; + } +-libnss_files_hidden_def (_nss_files_endnetgrent) ++libc_hidden_def (_nss_files_endnetgrent) + + static char * + strip_whitespace (char *str) +@@ -279,7 +277,7 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result, + + return status; + } +-libnss_files_hidden_def (_nss_netgroup_parseline) ++libc_hidden_def (_nss_netgroup_parseline) + + + enum nss_status +@@ -293,3 +291,4 @@ _nss_files_getnetgrent_r (struct __netgrent *result, char *buffer, + + return status; + } ++libc_hidden_def (_nss_files_getnetgrent_r) +diff --git a/nss/nss_files/files-network.c b/nss/nss_files/files-network.c +index 9cd7d7dc79..217ed78609 100644 +--- a/nss/nss_files/files-network.c ++++ b/nss/nss_files/files-network.c +@@ -22,8 +22,6 @@ + #include <stdint.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define ENTNAME netent + #define DATABASE "networks" + #define NEED_H_ERRNO +@@ -71,7 +69,7 @@ LINE_PARSER + *cp = '\0'; + addr = newp; + } +- result->n_net = inet_network (addr); ++ result->n_net = inet_network (addr); + result->n_addrtype = AF_INET; + + }) +diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c +index 68c51c7cbf..997eac573a 100644 +--- a/nss/nss_files/files-parse.c ++++ b/nss/nss_files/files-parse.c +@@ -74,13 +74,7 @@ struct parser_data + /* Export the line parser function so it can be used in nss_db. */ + # define parser_stclass /* Global */ + # define parse_line CONCAT(_nss_files_parse_,ENTNAME) +-# if IS_IN (libc) +-/* We are defining one of the functions that actually lives in libc +- because it is used to implement fget*ent and suchlike. */ +-# define nss_files_parse_hidden_def(name) libc_hidden_def (name) +-# else +-# define nss_files_parse_hidden_def(name) libnss_files_hidden_def (name) +-# endif ++# define nss_files_parse_hidden_def(name) libc_hidden_def (name) + #endif + + +diff --git a/nss/nss_files/files-proto.c b/nss/nss_files/files-proto.c +index 98d082c642..13072692c1 100644 +--- a/nss/nss_files/files-proto.c ++++ b/nss/nss_files/files-proto.c +@@ -19,8 +19,6 @@ + #include <netdb.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define ENTNAME protoent + #define DATABASE "protocols" + +diff --git a/nss/nss_files/files-pwd.c b/nss/nss_files/files-pwd.c +index b04165ddde..5c74c6da9b 100644 +--- a/nss/nss_files/files-pwd.c ++++ b/nss/nss_files/files-pwd.c +@@ -19,8 +19,6 @@ + #include <pwd.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define STRUCTURE passwd + #define ENTNAME pwent + #define DATABASE "passwd" +diff --git a/nss/nss_files/files-rpc.c b/nss/nss_files/files-rpc.c +index eeb2725d2c..3dea8f18f2 100644 +--- a/nss/nss_files/files-rpc.c ++++ b/nss/nss_files/files-rpc.c +@@ -19,8 +19,6 @@ + #include <rpc/netdb.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define ENTNAME rpcent + #define DATABASE "rpc" + +diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c +index f4f0985377..a8d83e094e 100644 +--- a/nss/nss_files/files-service.c ++++ b/nss/nss_files/files-service.c +@@ -20,8 +20,6 @@ + #include <netdb.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define ENTNAME servent + #define DATABASE "services" + +diff --git a/nss/nss_files/files-sgrp.c b/nss/nss_files/files-sgrp.c +index 6b1c9eac02..213a408e7b 100644 +--- a/nss/nss_files/files-sgrp.c ++++ b/nss/nss_files/files-sgrp.c +@@ -19,8 +19,6 @@ + #include <gshadow.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define STRUCTURE sgrp + #define ENTNAME sgent + #define DATABASE "gshadow" +diff --git a/nss/nss_files/files-spwd.c b/nss/nss_files/files-spwd.c +index 976deaf918..d031257a20 100644 +--- a/nss/nss_files/files-spwd.c ++++ b/nss/nss_files/files-spwd.c +@@ -19,8 +19,6 @@ + #include <shadow.h> + #include <nss.h> + +-NSS_DECLARE_MODULE_FUNCTIONS (files) +- + #define STRUCTURE spwd + #define ENTNAME spent + #define DATABASE "shadow" +diff --git a/nss/nss_files_data.c b/nss/nss_files_data.c +new file mode 100644 +index 0000000000..80fbfe5fff +--- /dev/null ++++ b/nss/nss_files_data.c +@@ -0,0 +1,161 @@ ++/* Returns a pointer to the global nss_files data structure. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <nss_files.h> ++ ++#include <allocate_once.h> ++#include <errno.h> ++#include <netdb.h> ++#include <nss.h> ++#include <stdlib.h> ++ ++/* This collects all per file-data. */ ++struct nss_files_data ++{ ++ struct nss_files_per_file_data files[nss_file_count]; ++}; ++ ++/* For use with allocate_once. */ ++static void *nss_files_global; ++static void * ++nss_files_global_allocate (void *closure) ++{ ++ struct nss_files_data *result = malloc (sizeof (*result)); ++ if (result != NULL) ++ { ++ for (int i = 0; i < nss_file_count; ++i) ++ { ++ result->files[i].stream = NULL; ++ __libc_lock_init (result->files[i].lock); ++ } ++ } ++ return result; ++} ++/* Like __nss_files_data_open, but does not perform the open call. */ ++static enum nss_status ++__nss_files_data_get (struct nss_files_per_file_data **pdata, ++ enum nss_files_file file, int *errnop, int *herrnop) ++{ ++ struct nss_files_data *data = allocate_once (&nss_files_global, ++ nss_files_global_allocate, ++ NULL, NULL); ++ if (data == NULL) ++ { ++ if (errnop != NULL) ++ *errnop = errno; ++ if (herrnop != NULL) ++ { ++ __set_h_errno (NETDB_INTERNAL); ++ *herrnop = NETDB_INTERNAL; ++ } ++ return NSS_STATUS_TRYAGAIN; ++ } ++ ++ *pdata = &data->files[file]; ++ __libc_lock_lock ((*pdata)->lock); ++ return NSS_STATUS_SUCCESS; ++} ++ ++/* Helper function for opening the backing file at PATH. */ ++static enum nss_status ++__nss_files_data_internal_open (struct nss_files_per_file_data *data, ++ const char *path) ++{ ++ enum nss_status status = NSS_STATUS_SUCCESS; ++ ++ if (data->stream == NULL) ++ { ++ data->stream = __nss_files_fopen (path); ++ ++ if (data->stream == NULL) ++ status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; ++ } ++ ++ return status; ++} ++ ++ ++enum nss_status ++__nss_files_data_open (struct nss_files_per_file_data **pdata, ++ enum nss_files_file file, const char *path, ++ int *errnop, int *herrnop) ++{ ++ enum nss_status status = __nss_files_data_get (pdata, file, errnop, herrnop); ++ if (status != NSS_STATUS_SUCCESS) ++ return status; ++ ++ /* Be prepared that the set*ent function was not called before. */ ++ if ((*pdata)->stream == NULL) ++ { ++ int saved_errno = errno; ++ status = __nss_files_data_internal_open (*pdata, path); ++ __set_errno (saved_errno); ++ if (status != NSS_STATUS_SUCCESS) ++ __nss_files_data_put (*pdata); ++ } ++ ++ return status; ++} ++ ++libc_hidden_def (__nss_files_data_open) ++ ++void ++__nss_files_data_put (struct nss_files_per_file_data *data) ++{ ++ __libc_lock_unlock (data->lock); ++} ++libc_hidden_def (__nss_files_data_put) ++ ++enum nss_status ++__nss_files_data_setent (enum nss_files_file file, const char *path) ++{ ++ struct nss_files_per_file_data *data; ++ enum nss_status status = __nss_files_data_get (&data, file, NULL, NULL); ++ if (status != NSS_STATUS_SUCCESS) ++ return status; ++ ++ if (data->stream == NULL) ++ status = __nss_files_data_internal_open (data, path); ++ else ++ rewind (data->stream); ++ ++ __nss_files_data_put (data); ++ return status; ++} ++libc_hidden_def (__nss_files_data_setent) ++ ++enum nss_status ++__nss_files_data_endent (enum nss_files_file file) ++{ ++ /* No cleanup is necessary if not initialized. */ ++ struct nss_files_data *data = atomic_load_acquire (&nss_files_global); ++ if (data == NULL) ++ return NSS_STATUS_SUCCESS; ++ ++ struct nss_files_per_file_data *fdata = &data->files[file]; ++ __libc_lock_lock (fdata->lock); ++ if (fdata->stream != NULL) ++ { ++ fclose (fdata->stream); ++ fdata->stream = NULL; ++ } ++ __libc_lock_unlock (fdata->lock); ++ ++ return NSS_STATUS_SUCCESS; ++} ++libc_hidden_def (__nss_files_data_endent) +diff --git a/nss/nss_files_functions.c b/nss/nss_files_functions.c +new file mode 100644 +index 0000000000..85720b4311 +--- /dev/null ++++ b/nss/nss_files_functions.c +@@ -0,0 +1,43 @@ ++/* Direct access for nss_files functions for NSS module loading. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <nss_module.h> ++#include <nss_files.h> ++ ++void ++__nss_files_functions (nss_module_functions_untyped pointers) ++{ ++ void **fptr = pointers; ++ ++ /* Functions which are not implemented. */ ++#define _nss_files_getcanonname_r NULL ++#define _nss_files_gethostbyaddr2_r NULL ++#define _nss_files_getpublickey NULL ++#define _nss_files_getsecretkey NULL ++#define _nss_files_netname2user NULL ++ ++#undef DEFINE_NSS_FUNCTION ++#define DEFINE_NSS_FUNCTION(x) *fptr++ = _nss_files_##x; ++#include "function.def" ++ ++#ifdef PTR_MANGLE ++ void **end = fptr; ++ for (fptr = pointers; fptr != end; ++fptr) ++ PTR_MANGLE (*fptr); ++#endif ++} +diff --git a/nss/nss_module.c b/nss/nss_module.c +index 60c070c851..7b42c585a4 100644 +--- a/nss/nss_module.c ++++ b/nss/nss_module.c +@@ -30,6 +30,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <nss_files.h> + + /* Suffix after .so of NSS service modules. This is a bit of magic, + but we assume LIBNSS_FILES_SO looks like "libnss_files.so.2" and we +@@ -110,10 +111,45 @@ static const function_name nss_function_name_array[] = + #include "function.def" + }; + ++static bool ++module_load_nss_files (struct nss_module *module) ++{ ++ if (is_nscd) ++ { ++ void (*cb) (size_t, struct traced_file *) = nscd_init_cb; ++# ifdef PTR_DEMANGLE ++ PTR_DEMANGLE (cb); ++# endif ++ _nss_files_init (cb); ++ } ++ ++ /* Initialize the function pointers, following the double-checked ++ locking idiom. */ ++ __libc_lock_lock (nss_module_list_lock); ++ switch ((enum nss_module_state) atomic_load_acquire (&module->state)) ++ { ++ case nss_module_uninitialized: ++ case nss_module_failed: ++ __nss_files_functions (module->functions.untyped); ++ module->handle = NULL; ++ /* Synchronizes with unlocked __nss_module_load atomic_load_acquire. */ ++ atomic_store_release (&module->state, nss_module_loaded); ++ break; ++ case nss_module_loaded: ++ /* Nothing to clean up. */ ++ break; ++ } ++ __libc_lock_unlock (nss_module_list_lock); ++ return true; ++} ++ + /* Internal implementation of __nss_module_load. */ + static bool + module_load (struct nss_module *module) + { ++ if (strcmp (module->name, "files") == 0) ++ return module_load_nss_files (module); ++ + void *handle; + { + char *shlib_name; +@@ -360,7 +396,7 @@ __nss_module_freeres (void) + struct nss_module *current = nss_module_list; + while (current != NULL) + { +- if (current->state == nss_module_loaded) ++ if (current->state == nss_module_loaded && current->handle != NULL) + __libc_dlclose (current->handle); + + struct nss_module *next = current->next; +diff --git a/nss/nss_module.h b/nss/nss_module.h +index 05c4791d11..c1a1d90b60 100644 +--- a/nss/nss_module.h ++++ b/nss/nss_module.h +@@ -38,6 +38,10 @@ struct nss_module_functions + typedef void *nss_module_functions_untyped[sizeof (struct nss_module_functions) + / sizeof (void *)]; + ++/* Locate the nss_files functions, as if by dlopen/dlsym. */ ++void __nss_files_functions (nss_module_functions_untyped pointers) ++ attribute_hidden; ++ + /* Initialization state of a NSS module. */ + enum nss_module_state + { +diff --git a/nss/nss_readline.c b/nss/nss_readline.c +index 4b3ecbccc8..a2f397a11f 100644 +--- a/nss/nss_readline.c ++++ b/nss/nss_readline.c +@@ -40,7 +40,7 @@ __nss_readline (FILE *fp, char *buf, size_t len, off64_t *poffset) + *poffset = __ftello64 (fp); + + buf[len - 1] = '\xff'; /* Marker to recognize truncation. */ +- if (fgets_unlocked (buf, len, fp) == NULL) ++ if (__fgets_unlocked (buf, len, fp) == NULL) + { + if (feof_unlocked (fp)) + { +@@ -61,7 +61,7 @@ __nss_readline (FILE *fp, char *buf, size_t len, off64_t *poffset) + line on the next call. */ + return __nss_readline_seek (fp, *poffset); + +- /* fgets_unlocked succeeded. */ ++ /* __fgets_unlocked succeeded. */ + + /* Remove leading whitespace. */ + char *p = buf; +diff --git a/nss/nss.h b/nss/nss.h +index ae213f9a6c..c6d62adc0f 100644 +--- a/nss/nss.h ++++ b/nss/nss.h +@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int); + extern nss_endgrent _nss_##module##_endgrent; \ + extern nss_endhostent _nss_##module##_endhostent; \ + extern nss_endnetent _nss_##module##_endnetent; \ +- extern nss_endnetgrent _nss_##module##__endnetgrent; \ ++ extern nss_endnetgrent _nss_##module##_endnetgrent; \ + extern nss_endprotoent _nss_##module##_endprotoent; \ + extern nss_endpwent _nss_##module##_endpwent; \ + extern nss_endrpcent _nss_##module##_endrpcent; \ +diff --git a/nss/nss_module.c b/nss/nss_module.c +index 7b42c585a4..7ea5ad9887 100644 +--- a/nss/nss_module.c ++++ b/nss/nss_module.c +@@ -114,14 +114,16 @@ static const function_name nss_function_name_array[] = + static bool + module_load_nss_files (struct nss_module *module) + { ++#ifdef USE_NSCD + if (is_nscd) + { + void (*cb) (size_t, struct traced_file *) = nscd_init_cb; +-# ifdef PTR_DEMANGLE ++# ifdef PTR_DEMANGLE + PTR_DEMANGLE (cb); +-# endif ++# endif + _nss_files_init (cb); + } ++#endif + + /* Initialize the function pointers, following the double-checked + locking idiom. */ diff --git a/gnu/packages/patches/gnupg-1-build-with-gcc10.patch b/gnu/packages/patches/gnupg-1-build-with-gcc10.patch new file mode 100644 index 0000000000..40b2aff98e --- /dev/null +++ b/gnu/packages/patches/gnupg-1-build-with-gcc10.patch @@ -0,0 +1,64 @@ +Borrowed from Debian +https://sources.debian.org/src/gnupg1/1.4.23-1.1/debian/patches/0006-fix-for-gcc10.patch/ + +Subject: Fix build with gcc-10 +Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de> +Date: 2021-01-04 +Bug: https://dev.gnupg.org/T5215 +Bug-Debian: https://bugs.debian.org/957293 + +--- a/g10/options.h ++++ b/g10/options.h +@@ -29,6 +29,8 @@ + /* Norcraft can't cope with common symbols */ + #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE) + #define EXTERN_UNLESS_MAIN_MODULE extern ++#elif defined (__GNUC__) && __GNUC__ >= 10 ++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__)) + #else + #define EXTERN_UNLESS_MAIN_MODULE + #endif +--- a/include/cipher.h ++++ b/include/cipher.h +@@ -117,6 +117,8 @@ + #ifndef EXTERN_UNLESS_MAIN_MODULE + #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE) + #define EXTERN_UNLESS_MAIN_MODULE extern ++#elif defined (__GNUC__) && __GNUC__ >= 10 ++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__)) + #else + #define EXTERN_UNLESS_MAIN_MODULE + #endif +--- a/include/iobuf.h ++++ b/include/iobuf.h +@@ -72,6 +72,8 @@ + #ifndef EXTERN_UNLESS_MAIN_MODULE + #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE) + #define EXTERN_UNLESS_MAIN_MODULE extern ++#elif defined (__GNUC__) && __GNUC__ >= 10 ++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__)) + #else + #define EXTERN_UNLESS_MAIN_MODULE + #endif +--- a/include/memory.h ++++ b/include/memory.h +@@ -93,6 +93,8 @@ + #ifndef EXTERN_UNLESS_MAIN_MODULE + #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE) + #define EXTERN_UNLESS_MAIN_MODULE extern ++#elif defined (__GNUC__) && __GNUC__ >= 10 ++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__)) + #else + #define EXTERN_UNLESS_MAIN_MODULE + #endif +--- a/include/mpi.h ++++ b/include/mpi.h +@@ -38,6 +38,8 @@ + #ifndef EXTERN_UNLESS_MAIN_MODULE + #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE) + #define EXTERN_UNLESS_MAIN_MODULE extern ++#elif defined (__GNUC__) && __GNUC__ >= 10 ++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__)) + #else + #define EXTERN_UNLESS_MAIN_MODULE + #endif diff --git a/gnu/packages/patches/gnutls-guile-eintr-eagain.patch b/gnu/packages/patches/gnutls-guile-eintr-eagain.patch new file mode 100644 index 0000000000..e04c945158 --- /dev/null +++ b/gnu/packages/patches/gnutls-guile-eintr-eagain.patch @@ -0,0 +1,56 @@ +Fixes <https://issues.guix.gnu.org/47867>. + +This fix was merged upstream +in <https://gitlab.com/gnutls/gnutls/-/merge_requests/1417> and will +be in GnuTLS 3.7.3. Upstream commit: + +commit 110e2172dbef1fbdf7399dab1e80780847b61c0c +Author: Ludovic Courtès <ludo@gnu.org> +Date: Sat Apr 24 22:02:14 2021 +0200 + + guile: Writes to record ports handle EAGAIN/EINTR transparently. + +diff --git a/guile/src/core.c b/guile/src/core.c +index a13670fc7b..0926dc8a97 100644 +--- a/guile/src/core.c ++++ b/guile/src/core.c +@@ -985,7 +985,10 @@ write_to_session_record_port (SCM port, const void *data, size_t size) + c_result = gnutls_record_send (c_session, (char *) data + c_sent, + size - c_sent); + if (EXPECT_FALSE (c_result < 0)) +- scm_gnutls_error (c_result, FUNC_NAME); ++ { ++ if (c_result != GNUTLS_E_AGAIN && c_result != GNUTLS_E_INTERRUPTED) ++ scm_gnutls_error (c_result, FUNC_NAME); ++ } + else + c_sent += c_result; + } +@@ -1069,7 +1072,8 @@ read_from_session_record_port (SCM port, SCM dst, size_t start, size_t count) + #undef FUNC_NAME + + /* Return the file descriptor that backs PORT. This function is called upon a +- blocking read--i.e., 'read_from_session_record_port' returned -1. */ ++ blocking read--i.e., 'read_from_session_record_port' or ++ 'write_to_session_record_port' returned -1. */ + static int + session_record_port_fd (SCM port) + { +@@ -1097,7 +1101,16 @@ write_to_session_record_port (SCM port, SCM src, size_t start, size_t count) + c_session = scm_to_gnutls_session (session, 1, FUNC_NAME); + data = (char *) SCM_BYTEVECTOR_CONTENTS (src) + start; + +- result = gnutls_record_send (c_session, data, count); ++ do ++ result = gnutls_record_send (c_session, data, count); ++ while (result == GNUTLS_E_INTERRUPTED ++ || (result == GNUTLS_E_AGAIN ++ && !SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session))); ++ ++ if (result == GNUTLS_E_AGAIN ++ && SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session)) ++ /* Tell Guile that reading would block. */ ++ return (size_t) -1; + + if (EXPECT_FALSE (result < 0)) + scm_gnutls_error (result, FUNC_NAME); diff --git a/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch new file mode 100644 index 0000000000..7408d4ec16 --- /dev/null +++ b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch @@ -0,0 +1,28 @@ +Backported from upstream PR: https://github.com/urfave/cli/pull/1299 +--- +diff --git a/app_test.go b/app_test.go +index 33024ff..6b3aaa3 100644 +--- a/app_test.go ++++ b/app_test.go +@@ -513,18 +513,18 @@ func TestApp_RunAsSubcommandParseFlags(t *testing.T) { + func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) { + a := App{ + Flags: []Flag{ +- StringFlag{Name: "--foo"}, ++ StringFlag{Name: "foo"}, + }, + Writer: bytes.NewBufferString(""), + } + + set := flag.NewFlagSet("", flag.ContinueOnError) +- _ = set.Parse([]string{"", "---foo"}) ++ _ = set.Parse([]string{"", "-bar"}) + c := &Context{flagSet: set} + + err := a.RunAsSubcommand(c) + +- expect(t, err, errors.New("bad flag syntax: ---foo")) ++ expect(t, err.Error(), "flag provided but not defined: -bar") + } + + func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) { diff --git a/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch new file mode 100644 index 0000000000..87ccc2b655 --- /dev/null +++ b/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch @@ -0,0 +1,37 @@ +From upstream PR: https://github.com/urfave/cli/pull/1299 + +From: William Wilson <william.wilson@canonical.com> +Date: Tue, 31 Aug 2021 14:19:17 -0500 +Subject: Make test case compatible with Go 1.17 + +As of Go 1.17, the go flag package will panic if given a syntactically invalid +flag. This causes TestApp_RunAsSubCommandIncorrectUsage to panic and therefore +fail. See https://golang.org/doc/go1.17#flag for more information. + +--- +diff --git a/app_test.go b/app_test.go +index 7c38f6048..76e211d68 100644 +--- a/app_test.go ++++ b/app_test.go +@@ -476,18 +476,18 @@ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) { + a := App{ + Name: "cmd", + Flags: []Flag{ +- &StringFlag{Name: "--foo"}, ++ &StringFlag{Name: "foo"}, + }, + Writer: bytes.NewBufferString(""), + } + + set := flag.NewFlagSet("", flag.ContinueOnError) +- _ = set.Parse([]string{"", "---foo"}) ++ _ = set.Parse([]string{"", "-bar"}) + c := &Context{flagSet: set} + + err := a.RunAsSubcommand(c) + +- expect(t, err, errors.New("bad flag syntax: ---foo")) ++ expect(t, err.Error(), "flag provided but not defined: -bar") + } + + func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) { diff --git a/gnu/packages/patches/gtk-doc-respect-xml-catalog.patch b/gnu/packages/patches/gtk-doc-respect-xml-catalog.patch new file mode 100644 index 0000000000..710f208285 --- /dev/null +++ b/gnu/packages/patches/gtk-doc-respect-xml-catalog.patch @@ -0,0 +1,16 @@ +Taken from here: +https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/documentation/gtk-doc/respect-xml-catalog-files-var.patch. + +--- a/m4/gtkdoc_jh_check_xml_catalog.m4 ++++ b/m4/gtkdoc_jh_check_xml_catalog.m4 +@@ -5,8 +5,8 @@ + [ + AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl + AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) +- if $jh_found_xmlcatalog && \ +- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then ++ # empty argument forces libxml to use XML_CATALOG_FILES variable ++ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then + AC_MSG_RESULT([found]) + ifelse([$3],,,[$3]) + else diff --git a/gnu/packages/patches/instead-use-games-path.patch b/gnu/packages/patches/instead-use-games-path.patch new file mode 100644 index 0000000000..783fd21add --- /dev/null +++ b/gnu/packages/patches/instead-use-games-path.patch @@ -0,0 +1,32 @@ +From 8b350daa847dd8e131d9e6b5b4434ce68a7903d0 Mon Sep 17 00:00:00 2001 +From: Dmitry Polyakov <polyakov@liltechdude.xyz> +Date: Wed, 4 Aug 2021 15:46:33 +0500 +Subject: [PATCH] Add support for INSTEAD_GAMES_PATH + +In some setups, users might prefer to determine on their own the path in +which games are located. This patch enables them to do so by setting +the “INSTEAD_GAMES_PATH” environmnent variable. +--- + src/main.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/main.c b/src/main.c +index ba0ada1d..b05497b8 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -394,6 +394,12 @@ int instead_main(int argc, char *argv[]) + setdir(game_cwd); + profile_load(NULL); + ++ char *gamespath_env = NULL; ++ ++ if (gamespath_env = getenv("INSTEAD_GAMES_PATH"), gamespath_env != NULL) { ++ games_sw = strdup(gamespath_env); ++ } ++ + for (i = 1; i < argc; i++) { + if (lua_sw) /* during load profile */ + break; +-- +2.32.0 + diff --git a/gnu/packages/patches/julia-tracker-16-compat.patch b/gnu/packages/patches/julia-tracker-16-compat.patch new file mode 100644 index 0000000000..4fff423e44 --- /dev/null +++ b/gnu/packages/patches/julia-tracker-16-compat.patch @@ -0,0 +1,40 @@ +https://github.com/FluxML/Tracker.jl/commit/f6550ba38a9ea5802e2de4fa9c939929ba711f0d.patch +from an upstream pull request +https://github.com/FluxML/Tracker.jl/pull/94 + + +From f6550ba38a9ea5802e2de4fa9c939929ba711f0d Mon Sep 17 00:00:00 2001 +From: Michael Abbott <me@escbook> +Date: Wed, 3 Feb 2021 22:58:33 +0100 +Subject: [PATCH] two fixes for 1.6 + +--- + src/lib/array.jl | 2 +- + src/lib/real.jl | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/array.jl b/src/lib/array.jl +index 92f2b39..f8cbbac 100644 +--- a/src/lib/array.jl ++++ b/src/lib/array.jl +@@ -298,7 +298,7 @@ Base.reverse(xs::TrackedArray; dims) = track(reverse, xs, dims = dims) + @grad reverse(xs; dims) = reverse(data(xs), dims = dims), Δ -> (reverse(Δ, dims = dims), nothing) + Base.reverse(xs::TrackedVector) = track(reverse, xs) + @grad reverse(xs::TrackedVector) = reverse(data(xs)), Δ -> (reverse(Δ),) +-Base.reverse(xs::TrackedVector, start, stop) = track(reverse, xs, start, stop) ++Base.reverse(xs::TrackedVector, start::Integer, stop::Integer) = track(reverse, xs, start, stop) + @grad reverse(xs, start, stop) = reverse(data(xs), start, stop), Δ -> (reverse(Δ, start, stop), nothing, nothing) + + function _kron(mat1::AbstractMatrix,mat2::AbstractMatrix) +diff --git a/src/lib/real.jl b/src/lib/real.jl +index 737afd8..e1975ac 100644 +--- a/src/lib/real.jl ++++ b/src/lib/real.jl +@@ -55,6 +55,7 @@ for f in :[isinf, isnan, isfinite].args + end + + Printf.fix_dec(x::TrackedReal, n::Int, a...) = Printf.fix_dec(data(x), n, a...) ++Printf.tofloat(x::TrackedReal) = Printf.tofloat(data(x)) + + Base.float(x::TrackedReal) = x + diff --git a/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch b/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch new file mode 100644 index 0000000000..e8d5dce0ed --- /dev/null +++ b/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch @@ -0,0 +1,35 @@ + Disable usage of SSLv3 in testing + + Integrated uptream version 0.9.74 + + +diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c + +--- a/src/testcurl/https/test_tls_options.c ++++ b/src/testcurl/https/test_tls_options.c +@@ -119,11 +119,6 @@ main (int argc, char *const *argv) + fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n"); + return 77; + } +- if (0 != strncmp (ssl_version, "GnuTLS", 6)) +- { +- fprintf (stderr, "This test can be run only with libcurl-gnutls.\n"); +- return 77; +- } + + if (! testsuite_curl_global_init ()) + return 99; +@@ -152,10 +147,10 @@ main (int argc, char *const *argv) + fprintf (stderr, + "The following handshake should fail (and print an error message)...\n"); + if (0 != +- test_wrap ("TLS1.0 vs SSL3", ++ test_wrap ("TLS1.1 vs TLS1.0", + &test_unmatching_ssl_version, NULL, port, daemon_flags, + aes256_sha, +- CURL_SSLVERSION_SSLv3, ++ CURL_SSLVERSION_TLSv1_1, + MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, + MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, + MHD_OPTION_HTTPS_PRIORITIES, + diff --git a/gnu/packages/patches/librime-fix-build-with-gcc10.patch b/gnu/packages/patches/librime-fix-build-with-gcc10.patch new file mode 100644 index 0000000000..49ad011b57 --- /dev/null +++ b/gnu/packages/patches/librime-fix-build-with-gcc10.patch @@ -0,0 +1,41 @@ +From: Felix Gruber <felgru@posteo.net> +Date: Mon, 6 Sep 2021 19:38:17 +0200 +Subject: [PATCH] Add missing <cmath> includes + +Fix a build failure with GCC 10 that manifests like this: + +------ +/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc: In member function ‘void rime::ScriptTranslation::PrepareCandidate()’: +/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:490:23: error: ‘exp’ was not declared in this scope + 490 | cand->set_quality(exp(entry->weight) + + | ^~~ +/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:504:23: error: ‘exp’ was not declared in this scope + 504 | cand->set_quality(exp(entry->weight) + + | ^~~ +make[2]: *** [src/CMakeFiles/rime.dir/build.make:1241: src/CMakeFiles/rime.dir/rime/gear/script_translator.cc.o] Error 1 +------ + +diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc +index 4a45f05..515c8db 100644 +--- a/src/rime/gear/script_translator.cc ++++ b/src/rime/gear/script_translator.cc +@@ -7,6 +7,7 @@ + // 2011-07-10 GONG Chen <chen.sst@gmail.com> + // + #include <algorithm> ++#include <cmath> + #include <stack> + #include <boost/algorithm/string/join.hpp> + #include <boost/range/adaptor/reversed.hpp> +diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc +index 162ac02..dbea76a 100644 +--- a/src/rime/gear/table_translator.cc ++++ b/src/rime/gear/table_translator.cc +@@ -4,6 +4,7 @@ + // + // 2011-07-10 GONG Chen <chen.sst@gmail.com> + // ++#include <cmath> + #include <boost/algorithm/string.hpp> + #include <boost/range/adaptor/reversed.hpp> + #include <utf8.h> diff --git a/gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch b/gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch new file mode 100644 index 0000000000..f6bc639f33 --- /dev/null +++ b/gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch @@ -0,0 +1,22 @@ +Taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/llvm-roc/files + +diff -Naur a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt +--- a/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:49.119055933 +0100 ++++ b/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:13.265056070 +0100 +@@ -2,6 +2,7 @@ + Core + MC + Support ++ Option + ) + + find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc) +diff -Naur a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt +--- a/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:41:39.521056199 +0100 ++++ b/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:40:23.998056487 +0100 +@@ -79,4 +79,5 @@ + LINK_LIBS + clangBasic + ${system_libs} ++ pthread + ) diff --git a/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch b/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch new file mode 100644 index 0000000000..f14ec4ac0d --- /dev/null +++ b/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch @@ -0,0 +1,29 @@ +Author: Wilfried (justxi) Holzke + +Adopted from https://github.com/justxi/rocm/blob/master/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch + +Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp +=================================================================== +--- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp ++++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp +@@ -326,11 +326,6 @@ void RocmInstallationDetector::AddHIPInc + // + // ROCm 3.5 does not fully support the wrapper headers. Therefore it needs + // a workaround. +- SmallString<128> P(D.ResourceDir); +- if (UsesRuntimeWrapper) +- llvm::sys::path::append(P, "include", "cuda_wrappers"); +- CC1Args.push_back("-internal-isystem"); +- CC1Args.push_back(DriverArgs.MakeArgString(P)); + } + + if (DriverArgs.hasArg(options::OPT_nogpuinc)) +@@ -341,8 +336,6 @@ void RocmInstallationDetector::AddHIPInc + return; + } + +- CC1Args.push_back("-internal-isystem"); +- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath())); + if (UsesRuntimeWrapper) + CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"}); + } diff --git a/gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch b/gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch new file mode 100644 index 0000000000..f1762a558b --- /dev/null +++ b/gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch @@ -0,0 +1,13 @@ +Taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/llvm-roc/files + +diff --color -uprN orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt +--- a/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:57:54.222796911 +0800 ++++ b/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:58:35.206796875 +0800 +@@ -11,6 +11,7 @@ add_llvm_component_library(LLVMAMDGPUDis + MC + MCDisassembler + Support ++ Object + + ADD_TO_COMPONENT + AMDGPU diff --git a/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch b/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch deleted file mode 100644 index 2a1c81648b..0000000000 --- a/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5ca6382fe8adb5bc436a6d873c8b86c69d5abfd1 Mon Sep 17 00:00:00 2001 -From: Sergey Poznyakoff <gray@gnu.org> -Date: Sun, 13 Sep 2020 14:43:46 +0300 -Subject: [PATCH] Fix uninitialized variable in readmsg - -* readmsg/readmsg.c (main): Initialize weedc. ---- - readmsg/readmsg.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c -index 9f305bb9c..3a9f420db 100644 ---- a/readmsg/readmsg.c -+++ b/readmsg/readmsg.c -@@ -466,7 +466,7 @@ main (int argc, char **argv) - mu_mailbox_t mbox = NULL; - struct mu_wordsplit ws; - char **weedv; -- int weedc; -+ int weedc = 0; - int unix_header = 0; - - /* Native Language Support */ --- -2.28.0 - diff --git a/gnu/packages/patches/mailutils-variable-lookup.patch b/gnu/packages/patches/mailutils-variable-lookup.patch new file mode 100644 index 0000000000..0069f3596d --- /dev/null +++ b/gnu/packages/patches/mailutils-variable-lookup.patch @@ -0,0 +1,26 @@ +Have 'send-message' look up 'mu-debug' & co. in the right +module: <https://issues.guix.gnu.org/49968>. + +Submitted: https://lists.gnu.org/archive/html/bug-mailutils/2021-09/msg00000.html + +--- + include/mailutils/guile.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/include/mailutils/guile.h b/include/mailutils/guile.h +index f05550678..47f89db39 100644 +--- a/include/mailutils/guile.h ++++ b/include/mailutils/guile.h +@@ -20,7 +20,8 @@ + + #include <libguile.h> + +-#define MU_SCM_SYMBOL_VALUE(p) SCM_VARIABLE_REF(scm_c_lookup(p)) ++#define MU_SCM_SYMBOL_VALUE(p) \ ++ (scm_c_public_ref ("mailutils mailutils", p)) + + typedef struct + { +-- +2.33.0 + diff --git a/gnu/packages/patches/marble-qt-add-qt-headers.patch b/gnu/packages/patches/marble-qt-add-qt-headers.patch new file mode 100644 index 0000000000..77c58317ad --- /dev/null +++ b/gnu/packages/patches/marble-qt-add-qt-headers.patch @@ -0,0 +1,189 @@ +Adapted from Debian: https://salsa.debian.org/qt-kde-team/kde/marble/-/blob/debian/4%2517.08.3-3.1/debian/patches/qt5.11.patch +Upstream status: Probably irrelevant, as this is an old version of this software. + +diff --git a/src/lib/marble/MergedLayerDecorator.cpp b/src/lib/marble/MergedLayerDecorator.cpp +index 40f3ddb..bafff50 100644 +--- a/src/lib/marble/MergedLayerDecorator.cpp ++++ b/src/lib/marble/MergedLayerDecorator.cpp +@@ -36,6 +36,7 @@ + + #include <QPointer> + #include <QPainter> ++#include <QPainterPath> + + using namespace Marble; + +diff --git a/src/lib/marble/VisiblePlacemark.cpp b/src/lib/marble/VisiblePlacemark.cpp +index cfe08af..1a84006 100644 +--- a/src/lib/marble/VisiblePlacemark.cpp ++++ b/src/lib/marble/VisiblePlacemark.cpp +@@ -22,6 +22,7 @@ + + #include <QApplication> + #include <QPainter> ++#include <QPainterPath> + #include <QPalette> + #include <QPixmapCache> + +diff --git a/src/lib/marble/graphicsview/FrameGraphicsItem.cpp b/src/lib/marble/graphicsview/FrameGraphicsItem.cpp +index 8a90526..065f245 100644 +--- a/src/lib/marble/graphicsview/FrameGraphicsItem.cpp ++++ b/src/lib/marble/graphicsview/FrameGraphicsItem.cpp +@@ -18,6 +18,7 @@ + // Qt + #include <QSizeF> + #include <QPainter> ++#include <QPainterPath> + #include <QPixmapCache> + #include <QMargins> + #include <qdrawutil.h> +diff --git a/src/lib/marble/layers/GroundLayer.cpp b/src/lib/marble/layers/GroundLayer.cpp +index 58d409f..df6d226 100644 +--- a/src/lib/marble/layers/GroundLayer.cpp ++++ b/src/lib/marble/layers/GroundLayer.cpp +@@ -14,6 +14,9 @@ + #include "ViewportParams.h" + #include "RenderState.h" + ++#include <QPainter> ++#include <QPainterPath> ++ + namespace Marble + { + +diff --git a/src/plugins/render/compass/CompassFloatItem.cpp b/src/plugins/render/compass/CompassFloatItem.cpp +index d8dc021..66095cc 100644 +--- a/src/plugins/render/compass/CompassFloatItem.cpp ++++ b/src/plugins/render/compass/CompassFloatItem.cpp +@@ -19,6 +19,7 @@ + #include <QRect> + #include <QColor> + #include <QPainter> ++#include <QPainterPath> + #include <QPushButton> + #include <QSvgRenderer> + +diff --git a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp +index a790c16..96f5bed 100644 +--- a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp ++++ b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp +@@ -31,6 +31,7 @@ + #include <QContextMenuEvent> + #include <QRect> + #include <QPainter> ++#include <QPainterPath> + #include <QPushButton> + #include <QMenu> + #include <QMouseEvent> +diff --git a/src/plugins/render/foursquare/FoursquareItem.cpp b/src/plugins/render/foursquare/FoursquareItem.cpp +index d9e1f57..ef80472 100644 +--- a/src/plugins/render/foursquare/FoursquareItem.cpp ++++ b/src/plugins/render/foursquare/FoursquareItem.cpp +@@ -13,6 +13,8 @@ + #include "ViewportParams.h" + + #include <QFontMetrics> ++#include <QPainter> ++#include <QPainterPath> + + namespace Marble + { +diff --git a/src/plugins/render/gpsinfo/GpsInfo.cpp b/src/plugins/render/gpsinfo/GpsInfo.cpp +index 522e907..20fd75a 100644 +--- a/src/plugins/render/gpsinfo/GpsInfo.cpp ++++ b/src/plugins/render/gpsinfo/GpsInfo.cpp +@@ -21,6 +21,8 @@ + #include "ViewportParams.h" + #include "GeoDataAccuracy.h" + ++#include <QIcon> ++ + namespace Marble + { + +diff --git a/src/plugins/render/license/License.cpp b/src/plugins/render/license/License.cpp +index 511dfc0..9436083 100644 +--- a/src/plugins/render/license/License.cpp ++++ b/src/plugins/render/license/License.cpp +@@ -23,6 +23,7 @@ + #include <QCommonStyle> + #include <QContextMenuEvent> + #include <QPainter> ++#include <QPainterPath> + #include <QLabel> + #include <QMenu> + #include <QMouseEvent> +diff --git a/src/plugins/render/notes/NotesItem.cpp b/src/plugins/render/notes/NotesItem.cpp +index 9d0961f..0c9fe99 100644 +--- a/src/plugins/render/notes/NotesItem.cpp ++++ b/src/plugins/render/notes/NotesItem.cpp +@@ -9,6 +9,7 @@ + #include "MarbleDirs.h" + + #include <QPainter> ++#include <QPainterPath> + #include <QRect> + + using namespace Marble; +diff --git a/src/plugins/render/postalcode/PostalCodeItem.cpp b/src/plugins/render/postalcode/PostalCodeItem.cpp +index 772c0b2..0ff7957 100644 +--- a/src/plugins/render/postalcode/PostalCodeItem.cpp ++++ b/src/plugins/render/postalcode/PostalCodeItem.cpp +@@ -17,6 +17,7 @@ + // Qt + #include <QFontMetrics> + #include <QPainter> ++#include <QPainterPath> + + using namespace Marble; + +diff --git a/src/plugins/render/progress/ProgressFloatItem.cpp b/src/plugins/render/progress/ProgressFloatItem.cpp +index a465857..6e2452c 100644 +--- a/src/plugins/render/progress/ProgressFloatItem.cpp ++++ b/src/plugins/render/progress/ProgressFloatItem.cpp +@@ -22,6 +22,7 @@ + #include <QColor> + #include <QPaintDevice> + #include <QPainter> ++#include <QPainterPath> + + namespace Marble + { +diff --git a/src/plugins/render/satellites/SatellitesPlugin.cpp b/src/plugins/render/satellites/SatellitesPlugin.cpp +index 04d8321..0a43d24 100644 +--- a/src/plugins/render/satellites/SatellitesPlugin.cpp ++++ b/src/plugins/render/satellites/SatellitesPlugin.cpp +@@ -25,6 +25,7 @@ + + #include "ui_SatellitesConfigDialog.h" + ++#include <QAction> + #include <QUrl> + #include <QMouseEvent> + +diff --git a/src/plugins/render/speedometer/Speedometer.cpp b/src/plugins/render/speedometer/Speedometer.cpp +index 6e9c532..f40a174 100644 +--- a/src/plugins/render/speedometer/Speedometer.cpp ++++ b/src/plugins/render/speedometer/Speedometer.cpp +@@ -19,6 +19,8 @@ + #include "MarbleGraphicsGridLayout.h" + #include "ViewportParams.h" + ++#include <QIcon> ++ + namespace Marble + { + +diff --git a/src/plugins/render/stars/StarsPlugin.cpp b/src/plugins/render/stars/StarsPlugin.cpp +index 6599545..482680f 100644 +--- a/src/plugins/render/stars/StarsPlugin.cpp ++++ b/src/plugins/render/stars/StarsPlugin.cpp +@@ -19,6 +19,8 @@ + #include <QContextMenuEvent> + #include <QMenu> + #include <QColorDialog> ++#include <QPainter> ++#include <QPainterPath> + #include <qmath.h> + + #include "MarbleClock.h" diff --git a/gnu/packages/patches/mesa-opencl-all-targets.patch b/gnu/packages/patches/mesa-opencl-all-targets.patch new file mode 100644 index 0000000000..99d4abcea4 --- /dev/null +++ b/gnu/packages/patches/mesa-opencl-all-targets.patch @@ -0,0 +1,25 @@ +This patch restores LLVM targets needed for OpenCL, *reverting* this +upstream commit: + + From 80817b6e344258ac9b955f824ebf9019a0fc1610 Mon Sep 17 00:00:00 2001 + From: Jesse Natalie <jenatali@microsoft.com> + Date: Wed, 18 Nov 2020 18:30:30 -0800 + Subject: [PATCH] meson: Adjust Clover's required LLVM modules + +diff --git a/meson.build b/meson.build +index 6d1607c35a3..f828eb80faa 100644 +--- b/meson.build ++++ a/meson.build +@@ -1479,10 +1479,9 @@ + endif + if with_gallium_opencl + llvm_modules += [ +- 'linker', 'coverage', 'instrumentation', 'ipo', 'irreader', +- 'lto', 'option', 'objcarcopts', 'profiledata' ++ 'all-targets', 'linker', 'coverage', 'instrumentation', 'ipo', 'irreader', ++ 'lto', 'option', 'objcarcopts', 'profiledata', + ] +- llvm_optional_modules += ['frontendopenmp'] + endif + if with_microsoft_clc + llvm_modules += ['target', 'linker', 'irreader', 'option', 'libdriver'] diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch index 2622d5d312..8f587ea7ef 100644 --- a/gnu/packages/patches/mesa-skip-tests.patch +++ b/gnu/packages/patches/mesa-skip-tests.patch @@ -1,23 +1,3 @@ -disk_cache_create() here looks up the users home directory from <pwd.h> -which resolves to "/" in the build environment. I could not find an easy -way to set the home directory to something else, so we disable this test -for now. - ---- a/src/compiler/glsl/tests/cache_test.c -+++ b/src/compiler/glsl/tests/cache_test.c -@@ -170,11 +170,6 @@ - unsetenv("MESA_GLSL_CACHE_DIR"); - unsetenv("XDG_CACHE_HOME"); - -- cache = disk_cache_create("test", "make_check", 0); -- expect_non_null(cache, "disk_cache_create with no environment variables"); -- -- disk_cache_destroy(cache); -- - /* Test with XDG_CACHE_HOME set */ - setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1); - cache = disk_cache_create("test", "make_check", 0); - This test fails on i686-linux. I couldn't come up with a regex that could be used to disable it just on i686-linux, so we disable it completely with this patch: diff --git a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch new file mode 100644 index 0000000000..a74034a2c5 --- /dev/null +++ b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch @@ -0,0 +1,156 @@ +From d10ea2ad7efc2364a8a2007b4c6d3e85511e2f84 Mon Sep 17 00:00:00 2001 +From: Maxime Devos <maximedevos@telenet.be> +Date: Tue, 3 Aug 2021 01:00:23 +0200 +Subject: [PATCH] Add environment variable MINETEST_MOD_PATH + +This adds an environment variable MINETEST_MOD_PATH. +When it exists, Minetest will look there for mods +in addition to ~/.minetest/mods/. Mods can still be +installed to ~/.minetest/mods/ with the built-in installer. + +With thanks to Leo Prikler. +--- + builtin/mainmenu/pkgmgr.lua | 7 +++---- + doc/menu_lua_api.txt | 8 +++++++- + src/content/subgames.cpp | 11 +++++++++++ + src/script/lua_api/l_mainmenu.cpp | 23 +++++++++++++++++++++++ + src/script/lua_api/l_mainmenu.h | 2 ++ + 5 files changed, 46 insertions(+), 5 deletions(-) + +diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua +index 787936e31..d8fba0ebe 100644 +--- a/builtin/mainmenu/pkgmgr.lua ++++ b/builtin/mainmenu/pkgmgr.lua +@@ -682,10 +682,9 @@ function pkgmgr.preparemodlist(data) + local game_mods = {} + + --read global mods +- local modpath = core.get_modpath() +- +- if modpath ~= nil and +- modpath ~= "" then ++ local modpaths = core.get_modpaths() ++ --XXX what was ‘modpath ~= ""’ and ‘modpath ~= nil’ for? ++ for _,modpath in ipairs(modpaths) do + get_mods(modpath,global_mods) + end + +diff --git a/doc/menu_lua_api.txt b/doc/menu_lua_api.txt +index b3975bc1d..132444b14 100644 +--- a/doc/menu_lua_api.txt ++++ b/doc/menu_lua_api.txt +@@ -218,7 +218,13 @@ Package - content which is downloadable from the content db, may or may not be i + * returns path to global user data, + the directory that contains user-provided mods, worlds, games, and texture packs. + * core.get_modpath() (possible in async calls) +- * returns path to global modpath ++ * returns path to global modpath, where mods can be installed ++* core.get_modpaths() (possible in async calls) ++ * returns list of paths to global modpaths, where mods have been installed ++ ++ The difference with "core.get_modpath" is that no mods should be installed in these ++ directories by Minetest -- they might be read-only. ++ + * core.get_clientmodpath() (possible in async calls) + * returns path to global client-side modpath + * core.get_gamepath() (possible in async calls) +diff --git a/src/content/subgames.cpp b/src/content/subgames.cpp +index e9dc609b0..d73f95a1f 100644 +--- a/src/content/subgames.cpp ++++ b/src/content/subgames.cpp +@@ -61,6 +61,12 @@ std::string getSubgamePathEnv() + return subgame_path ? std::string(subgame_path) : ""; + } + ++std::string getModPathEnv() ++{ ++ char *mod_path = getenv("MINETEST_MOD_PATH"); ++ return mod_path ? std::string(mod_path) : ""; ++} ++ + SubgameSpec findSubgame(const std::string &id) + { + if (id.empty()) +@@ -110,6 +116,11 @@ SubgameSpec findSubgame(const std::string &id) + std::set<std::string> mods_paths; + if (!user_game) + mods_paths.insert(share + DIR_DELIM + "mods"); ++ ++ Strfnd mod_search_paths(getModPathEnv()); ++ while (!mod_search_paths.at_end()) ++ mods_paths.insert(mod_search_paths.next(PATH_DELIM)); ++ + if (user != share || user_game) + mods_paths.insert(user + DIR_DELIM + "mods"); + +diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp +index 3e9709bde..903ac3a22 100644 +--- a/src/script/lua_api/l_mainmenu.cpp ++++ b/src/script/lua_api/l_mainmenu.cpp +@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., + #include "lua_api/l_internal.h" + #include "common/c_content.h" + #include "cpp_api/s_async.h" ++#include "util/strfnd.h" + #include "gui/guiEngine.h" + #include "gui/guiMainMenu.h" + #include "gui/guiKeyChangeMenu.h" +@@ -502,6 +503,26 @@ int ModApiMainMenu::l_get_modpath(lua_State *L) + return 1; + } + ++/******************************************************************************/ ++int ModApiMainMenu::l_get_modpaths(lua_State *L) ++{ ++ const char *c_modpath = getenv("MINETEST_MOD_PATH"); ++ if (c_modpath == NULL) ++ c_modpath = ""; ++ int index = 1; ++ lua_newtable(L); ++ Strfnd mod_search_paths{std::string(c_modpath)}; ++ while (!mod_search_paths.at_end()) { ++ std::string component = mod_search_paths.next(PATH_DELIM); ++ lua_pushstring(L, component.c_str()); ++ lua_rawseti(L, -2, index); ++ index++; ++ } ++ ModApiMainMenu::l_get_modpath(L); ++ lua_rawseti(L, -2, index); ++ return 1; ++} ++ + /******************************************************************************/ + int ModApiMainMenu::l_get_clientmodpath(lua_State *L) + { +@@ -949,6 +970,7 @@ void ModApiMainMenu::Initialize(lua_State *L, int top) + API_FCT(get_mapgen_names); + API_FCT(get_user_path); + API_FCT(get_modpath); ++ API_FCT(get_modpaths); + API_FCT(get_clientmodpath); + API_FCT(get_gamepath); + API_FCT(get_texturepath); +@@ -983,6 +1005,7 @@ void ModApiMainMenu::InitializeAsync(lua_State *L, int top) + API_FCT(get_mapgen_names); + API_FCT(get_user_path); + API_FCT(get_modpath); ++ API_FCT(get_modpaths); + API_FCT(get_clientmodpath); + API_FCT(get_gamepath); + API_FCT(get_texturepath); +diff --git a/src/script/lua_api/l_mainmenu.h b/src/script/lua_api/l_mainmenu.h +index 33ac9e721..a6a54a2cb 100644 +--- a/src/script/lua_api/l_mainmenu.h ++++ b/src/script/lua_api/l_mainmenu.h +@@ -112,6 +112,8 @@ class ModApiMainMenu: public ModApiBase + + static int l_get_modpath(lua_State *L); + ++ static int l_get_modpaths(lua_State *L); ++ + static int l_get_clientmodpath(lua_State *L); + + static int l_get_gamepath(lua_State *L); +-- +2.32.0 + diff --git a/gnu/packages/patches/mpg321-gcc-10.patch b/gnu/packages/patches/mpg321-gcc-10.patch new file mode 100644 index 0000000000..8966d9f7c8 --- /dev/null +++ b/gnu/packages/patches/mpg321-gcc-10.patch @@ -0,0 +1,83 @@ +From f930c3b81bdf9c05152fb005562b3869f6e36f34 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> +Date: Thu, 4 Jun 2020 20:41:25 +0300 +Subject: [PATCH] Fix GCC10 compilation + +--- + mpg321.c | 8 ++++++++ + mpg321.h | 16 ++++++++-------- + 2 files changed, 16 insertions(+), 8 deletions(-) + +diff --git a/mpg321.c b/mpg321.c +index 19282bb..663882e 100644 +--- a/mpg321.c ++++ b/mpg321.c +@@ -63,6 +63,14 @@ + #include <pthread.h> + #include <semaphore.h> + ++output_frame *Output_Queue; ++decoded_frames *Decoded_Frames; ++int semarray; ++int mad_decoder_position; ++int output_buffer_position; ++double real[FFT_BUFFER_SIZE]; ++double imag[FFT_BUFFER_SIZE]; ++int loop_remaining; + + int pflag = 0; + int volume = 0; +diff --git a/mpg321.h b/mpg321.h +index 798bff0..235cf4a 100644 +--- a/mpg321.h ++++ b/mpg321.h +@@ -116,7 +116,7 @@ extern char *playlist_file; + extern int quit_now; + extern char remote_input_buf[PATH_MAX + 5]; + extern int file_change; +-int loop_remaining; ++extern int loop_remaining; + + extern int status; + extern int scrobbler_time; +@@ -233,8 +233,8 @@ RETSIGTYPE handle_sigchld(int sig); + #define FFT_BUFFER_SIZE_LOG 9 + #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) /* 512 */ + /*Temporary data stores to perform FFT in */ +-double real[FFT_BUFFER_SIZE]; +-double imag[FFT_BUFFER_SIZE]; ++extern double real[FFT_BUFFER_SIZE]; ++extern double imag[FFT_BUFFER_SIZE]; + + typedef struct { + double real[FFT_BUFFER_SIZE]; +@@ -258,10 +258,10 @@ fft_state *fft_init(void); + /* Output buffer process */ + void frame_buffer_p(); + /* Semaphore array */ +-int semarray; ++extern int semarray; + /* Input/Output buffer position */ +-int mad_decoder_position; +-int output_buffer_position; ++extern int mad_decoder_position; ++extern int output_buffer_position; + /* Output Frame including needed information */ + typedef struct { + unsigned char data[4*1152]; +@@ -285,10 +285,10 @@ typedef struct { + } decoded_frames; + + /* Output frame queue pointer */ +-output_frame *Output_Queue; ++extern output_frame *Output_Queue; + + /* Shared total decoded frames */ +-decoded_frames *Decoded_Frames; ++extern decoded_frames *Decoded_Frames; + + #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) + /* */ +-- +2.26.2 + diff --git a/gnu/packages/patches/ocaml-4.09-multiple-definitions.patch b/gnu/packages/patches/ocaml-4.09-multiple-definitions.patch new file mode 100644 index 0000000000..b2661f822c --- /dev/null +++ b/gnu/packages/patches/ocaml-4.09-multiple-definitions.patch @@ -0,0 +1,41 @@ +Avoid multiply-defined symbols that lead to link errors such as: + + ld: libcamlrund.a(backtrace_bd.o):/tmp/guix-build-ocaml-4.09.0.drv-0/ocaml-4.09.0/runtime/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlrund.a(backtrace_byt_bd.o):/tmp/guix-build-ocaml-4.09.0.drv-0/ocaml-4.09.0/runtime/backtrace_byt.c:47: first defined here + +diff --git a/runtime/backtrace.c b/runtime/backtrace.c +index a3c2c08..f57c81c 100644 +--- a/runtime/backtrace.c ++++ b/runtime/backtrace.c +@@ -28,7 +28,7 @@ + #include "caml/fail.h" + + /* The table of debug information fragments */ +-struct ext_table caml_debug_info; ++static struct ext_table caml_debug_info; + + CAMLexport int32_t caml_backtrace_active = 0; + CAMLexport int32_t caml_backtrace_pos = 0; +diff --git a/runtime/backtrace_byt.c b/runtime/backtrace_byt.c +index b913dac..b5ec926 100644 +--- a/runtime/backtrace_byt.c ++++ b/runtime/backtrace_byt.c +@@ -44,7 +44,7 @@ + #include "caml/backtrace_prim.h" + + /* The table of debug information fragments */ +-struct ext_table caml_debug_info; ++static struct ext_table caml_debug_info; + + CAMLexport char_os * caml_cds_file = NULL; + +diff --git a/runtime/startup_nat.c b/runtime/startup_nat.c +index b4e6bc4..7eca5fa 100644 +--- a/runtime/startup_nat.c ++++ b/runtime/startup_nat.c +@@ -44,6 +44,5 @@ + #endif + + extern int caml_parser_trace; +-CAMLexport header_t caml_atom_table[256]; + char * caml_code_area_start, * caml_code_area_end; + struct ext_table caml_code_fragments_table; diff --git a/gnu/packages/patches/ocaml-multiple-definitions.patch b/gnu/packages/patches/ocaml-multiple-definitions.patch new file mode 100644 index 0000000000..e8678f4f64 --- /dev/null +++ b/gnu/packages/patches/ocaml-multiple-definitions.patch @@ -0,0 +1,43 @@ +Avoid multiply-defined symbols that lead to link errors such as: + + gcc -O2 -fno-strict-aliasing -fwrapv -Wall -fno-tree-vrp -g -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE -Wl,-E -o ocamlruni prims.o libcamlruni.a -lm -ldl -lpthread + ld: libcamlruni.a(backtrace.i.o):/tmp/guix-build-ocaml-4.07.1.drv-0/ocaml-4.07.1/byterun/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlruni.a(backtrace_prim.i.o):/tmp/guix-build-ocaml-4.07.1.drv-0/ocaml-4.07.1/byterun/backtrace_prim.c:47: first defined here + +diff --git a/asmrun/startup.c b/asmrun/startup.c +index 070f0c6..cf8a56f 100644 +--- a/asmrun/startup.c ++++ b/asmrun/startup.c +@@ -44,7 +44,6 @@ + #endif + + extern int caml_parser_trace; +-CAMLexport header_t caml_atom_table[256]; + char * caml_code_area_start, * caml_code_area_end; + struct ext_table caml_code_fragments_table; + +diff --git a/byterun/backtrace.c b/byterun/backtrace.c +index 8dfe9b7..9cc9e72 100644 +--- a/byterun/backtrace.c ++++ b/byterun/backtrace.c +@@ -28,7 +28,7 @@ + #include "caml/fail.h" + + /* The table of debug information fragments */ +-struct ext_table caml_debug_info; ++static struct ext_table caml_debug_info; + + CAMLexport int32_t caml_backtrace_active = 0; + CAMLexport int32_t caml_backtrace_pos = 0; +diff --git a/byterun/backtrace_prim.c b/byterun/backtrace_prim.c +index e69b256..d794f73 100644 +--- a/byterun/backtrace_prim.c ++++ b/byterun/backtrace_prim.c +@@ -44,7 +44,7 @@ + #include "caml/backtrace_prim.h" + + /* The table of debug information fragments */ +-struct ext_table caml_debug_info; ++static struct ext_table caml_debug_info; + + CAMLexport char_os * caml_cds_file = NULL; + diff --git a/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch b/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch new file mode 100644 index 0000000000..b437bfb061 --- /dev/null +++ b/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch @@ -0,0 +1,42 @@ +From 6103f6fc56f978c847ba7c1f2d9f38ee93a5e337 Mon Sep 17 00:00:00 2001 +From: Sonja Heinze <sonjaleaheinze@gmail.com> +Date: Tue, 9 Mar 2021 12:57:47 +0100 +Subject: [PATCH] Adapt to Ppxlib's API change + +Ppxlib is removing Lexer.keyword_table from the API in exchange for +the more lightweight Keyword.is_keyword. + +Signed-off-by: Sonja Heinze <sonjaleaheinze@gmail.com> +--- +Patch from <https://github.com/janestreet/ppx_variants_conv/pull/9>. + + ppx_variants_conv.opam | 2 +- + src/ppx_variants_conv.ml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ppx_variants_conv.opam b/ppx_variants_conv.opam +index 7e7148d..b56040f 100644 +--- a/ppx_variants_conv.opam ++++ b/ppx_variants_conv.opam +@@ -15,7 +15,7 @@ depends: [ + "base" {>= "v0.14" & < "v0.15"} + "variantslib" {>= "v0.14" & < "v0.15"} + "dune" {>= "2.0.0"} +- "ppxlib" {>= "0.14.0"} ++ "ppxlib" {>= "0.23.0"} + ] + synopsis: "Generation of accessor and iteration functions for ocaml variant types" + description: " +diff --git a/src/ppx_variants_conv.ml b/src/ppx_variants_conv.ml +index 8d60086..112fc78 100644 +--- a/src/ppx_variants_conv.ml ++++ b/src/ppx_variants_conv.ml +@@ -66,7 +66,7 @@ end + + let variant_name_to_string v = + let s = String.lowercase v in +- if Caml.Hashtbl.mem Lexer.keyword_table s ++ if Keyword.is_keyword s + then s ^ "_" + else s + diff --git a/gnu/packages/patches/onnx-optimizer-system-library.patch b/gnu/packages/patches/onnx-optimizer-system-library.patch new file mode 100644 index 0000000000..5c592597e0 --- /dev/null +++ b/gnu/packages/patches/onnx-optimizer-system-library.patch @@ -0,0 +1,53 @@ +Arrange so that onnx-optimizer (1) uses our own ONNX build, +(2) builds as a shared library, and (3) links against the shared +libraries of ONNX. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c2e48b35..8af51076 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,8 +9,6 @@ endif(NOT MSVC) + + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +-set(ONNX_ROOT ${PROJECT_SOURCE_DIR}/third_party/onnx) +-add_subdirectory(${ONNX_ROOT}) + + file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" ONNX_OPTIMIZER_VERSION) + string(STRIP "${ONNX_OPTIMIZER_VERSION}" ONNX_OPTIMIZER_VERSION) +@@ -21,14 +19,18 @@ file(GLOB_RECURSE onnx_opt_srcs "onnxoptimizer/*.cc" + list(REMOVE_ITEM onnx_opt_srcs "${PROJECT_SOURCE_DIR}/onnxoptimizer/cpp2py_export.cc") + + add_library(onnx_optimizer ${onnx_opt_srcs}) +-target_link_libraries(onnx_optimizer PUBLIC onnx) ++target_link_libraries(onnx_optimizer PUBLIC onnx onnx_proto) + target_include_directories(onnx_optimizer PUBLIC + $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> + $<INSTALL_INTERFACE:include> + ) + ++# These cpp macros must be defined so the ONNX headers behave ++# correctly. ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DONNX_ML=1 -DONNX_NAMESPACE=onnx") ++ + add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp) +-target_link_libraries(onnx_optimizer_exec onnx_optimizer) ++target_link_libraries(onnx_optimizer_exec onnx_optimizer protobuf) + + if(BUILD_ONNX_PYTHON) + if("${PY_EXT_SUFFIX}" STREQUAL "") +@@ -79,11 +81,10 @@ if(BUILD_ONNX_PYTHON) + PRIVATE $<TARGET_OBJECTS:onnx_optimizer>) + else() + # Assume everything else is like gcc +- target_link_libraries(onnx_opt_cpp2py_export +- PRIVATE "-Wl,--whole-archive" $<TARGET_FILE:onnx_optimizer> +- "-Wl,--no-whole-archive") ++ target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer) + set_target_properties(onnx_opt_cpp2py_export +- PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL") ++ PROPERTIES LINK_FLAGS ++ "-Wl,-rpath=${CMAKE_INSTALL_PREFIX}/lib") + endif() + + target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer) diff --git a/gnu/packages/patches/onnx-shared-libraries.patch b/gnu/packages/patches/onnx-shared-libraries.patch new file mode 100644 index 0000000000..00583b35da --- /dev/null +++ b/gnu/packages/patches/onnx-shared-libraries.patch @@ -0,0 +1,24 @@ +These linker options for the 'onnx_cpp2py_export.cpython-38-*-gnu.so' +(or similar) extension are meant to be used when building 'libonn.a', +a static archive. This patch adapts the link flags to linking with +'libonnx.so'. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cede3073..52f846ed 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -475,11 +475,10 @@ if(BUILD_ONNX_PYTHON) + PRIVATE $<TARGET_OBJECTS:onnx>) + else() + # Assume everything else is like gcc +- target_link_libraries(onnx_cpp2py_export +- PRIVATE "-Wl,--whole-archive" $<TARGET_FILE:onnx> +- "-Wl,--no-whole-archive") ++ target_link_libraries(onnx_cpp2py_export PRIVATE onnx) + set_target_properties(onnx_cpp2py_export +- PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL") ++ PROPERTIES LINK_FLAGS ++ "-Wl,-rpath=${CMAKE_INSTALL_PREFIX}/lib") + endif() + + target_link_libraries(onnx_cpp2py_export PRIVATE onnx) diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch new file mode 100644 index 0000000000..4ab55b4ceb --- /dev/null +++ b/gnu/packages/patches/onnx-skip-model-downloads.patch @@ -0,0 +1,16 @@ +A few tests require downloading models from URLs such as + <https://s3.amazonaws.com/download.onnx/models/opset_9/zfnet512.tar.gz>. +Skip those. + +diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__init__.py +index 049ed57b..f236f1bf 100644 +--- a/onnx/backend/test/runner/__init__.py ++++ b/onnx/backend/test/runner/__init__.py +@@ -202,6 +202,7 @@ class Runner(object): + print('Start downloading model {} from {}'.format( + model_test.model_name, + model_test.url)) ++ raise unittest.SkipTest('Skipping download') + urlretrieve(model_test.url, download_file.name) + print('Done') + with tarfile.open(download_file.name) as t: diff --git a/gnu/packages/patches/python-onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch index 33d2fa12de..5dfcbc6dc3 100644 --- a/gnu/packages/patches/python-onnx-use-system-googletest.patch +++ b/gnu/packages/patches/onnx-use-system-googletest.patch @@ -1,3 +1,6 @@ +ONNX will build googletest from a Git checkout. Patch CMake to use our +googletest package and enable tests by default. + diff --git a/CMakeLists.txt b/CMakeLists.txt index 0aa9fda2..a573170c 100644 --- a/CMakeLists.txt diff --git a/gnu/packages/patches/pipewire-0.2.7-fno-common.patch b/gnu/packages/patches/pipewire-0.2.7-fno-common.patch new file mode 100644 index 0000000000..f7d9b25932 --- /dev/null +++ b/gnu/packages/patches/pipewire-0.2.7-fno-common.patch @@ -0,0 +1,51 @@ +Fixes 'multiple definition errors' when building with GCC 10+ + +From: https://bugs.gentoo.org/710796 +Originally from: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/a62e41e +and https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/7a976c7 + +--- a/spa/plugins/bluez5/a2dp-codecs.h ++++ b/spa/plugins/bluez5/a2dp-codecs.h +@@ -284,15 +284,15 @@ + } + } + +-const a2dp_sbc_t bluez_a2dp_sbc; ++extern const a2dp_sbc_t bluez_a2dp_sbc; + #if ENABLE_MP3 +-const a2dp_mpeg_t bluez_a2dp_mpeg; ++extern const a2dp_mpeg_t bluez_a2dp_mpeg; + #endif + #if ENABLE_AAC +-const a2dp_aac_t bluez_a2dp_aac; ++extern const a2dp_aac_t bluez_a2dp_aac; + #endif + #if ENABLE_APTX +-const a2dp_aptx_t bluez_a2dp_aptx; ++extern const a2dp_aptx_t bluez_a2dp_aptx; + #endif + + #endif +--- a/spa/plugins/bluez5/bluez5-monitor.c ++++ b/spa/plugins/bluez5/bluez5-monitor.c +@@ -75,7 +75,7 @@ + struct spa_list transport_list; + }; + +-struct spa_handle_factory spa_a2dp_sink_factory; ++extern struct spa_handle_factory spa_a2dp_sink_factory; + + static void fill_item(struct spa_bt_monitor *this, struct spa_bt_transport *transport, + struct spa_pod **result, struct spa_pod_builder *builder) +--- a/spa/plugins/bluez5/meson.build ++++ b/spa/plugins/bluez5/meson.build +@@ -1,7 +1,8 @@ + + bluez5_sources = ['plugin.c', + 'a2dp-sink.c', +- 'bluez5-monitor.c'] ++ 'a2dp-codecs.c', ++ 'bluez5-monitor.c'] + + bluez5lib = shared_library('spa-bluez5', + bluez5_sources, diff --git a/gnu/packages/patches/pthreadpool-system-libraries.patch b/gnu/packages/patches/pthreadpool-system-libraries.patch new file mode 100644 index 0000000000..3cfe9c1af6 --- /dev/null +++ b/gnu/packages/patches/pthreadpool-system-libraries.patch @@ -0,0 +1,79 @@ +This patch allows the build process to use the provided dependencies instead +of adding their source as CMake sub-directories (in which case "make install" +would install googletest's and googlebenchmark's libraries and headers). + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c1cba55..627550f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ MACRO(PTHREADPOOL_TARGET_ENABLE_CXX11 target) + ENDMACRO() + + # ---[ Download deps +-IF(NOT DEFINED FXDIV_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading FXdiv to ${CMAKE_BINARY_DIR}/FXdiv-source (define FXDIV_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CMAKE_BINARY_DIR}/FXdiv-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -46,7 +46,7 @@ IF(NOT DEFINED FXDIV_SOURCE_DIR) + SET(FXDIV_SOURCE_DIR "${CMAKE_BINARY_DIR}/FXdiv-source" CACHE STRING "FXdiv source directory") + ENDIF() + +-IF(PTHREADPOOL_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Test to ${CMAKE_BINARY_DIR}/googletest-source (define GOOGLETEST_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -56,7 +56,7 @@ IF(PTHREADPOOL_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) + SET(GOOGLETEST_SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-source" CACHE STRING "Google Test source directory") + ENDIF() + +-IF(PTHREADPOOL_BUILD_BENCHMARKS AND NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Benchmark to ${CMAKE_BINARY_DIR}/googlebenchmark-source (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CMAKE_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -150,27 +150,18 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + ENDIF() + + # ---[ Configure FXdiv +-IF(NOT TARGET fxdiv) ++IF(FALSE) + SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( + "${FXDIV_SOURCE_DIR}" + "${CMAKE_BINARY_DIR}/FXdiv") + ENDIF() +-TARGET_LINK_LIBRARIES(pthreadpool PRIVATE fxdiv) +- + INSTALL(TARGETS pthreadpool + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + IF(PTHREADPOOL_BUILD_TESTS) +- # ---[ Build google test +- IF(NOT TARGET gtest) +- SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- ADD_SUBDIRECTORY( +- "${GOOGLETEST_SOURCE_DIR}" +- "${CMAKE_BINARY_DIR}/googletest") +- ENDIF() + + ADD_EXECUTABLE(pthreadpool-test test/pthreadpool.cc) + SET_TARGET_PROPERTIES(pthreadpool-test PROPERTIES +@@ -188,14 +179,6 @@ IF(PTHREADPOOL_BUILD_TESTS) + ENDIF() + + IF(PTHREADPOOL_BUILD_BENCHMARKS) +- # ---[ Build google benchmark +- IF(NOT TARGET benchmark) +- SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "") +- ADD_SUBDIRECTORY( +- "${GOOGLEBENCHMARK_SOURCE_DIR}" +- "${CMAKE_BINARY_DIR}/googlebenchmark") +- ENDIF() +- + ADD_EXECUTABLE(latency-bench bench/latency.cc) + SET_TARGET_PROPERTIES(latency-bench PROPERTIES + CXX_STANDARD 11 diff --git a/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch b/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch deleted file mode 100644 index 464aad967f..0000000000 --- a/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch +++ /dev/null @@ -1,278 +0,0 @@ -Fix a few testcases. Adapted from python-3-fix-tests.patch. - -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_callbacks.py pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_callbacks.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_callbacks.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_callbacks.py 2020-05-21 14:19:14.827288853 +0200 -@@ -4,6 +4,7 @@ - from ctypes import * - from ctypes.test import need_symbol - import _ctypes_test -+import platform - - class Callbacks(unittest.TestCase): - functype = CFUNCTYPE -@@ -178,6 +179,8 @@ - - self.assertLess(diff, 0.01, "%s not less than 0.01" % diff) - -+ @unittest.skipIf(platform.machine() in ['mips64'], -+ "This test fails on this platform") - def test_issue_8959_a(self): - from ctypes.util import find_library - libc_path = find_library("c") -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_libc.py pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_libc.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_libc.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_libc.py 2020-05-21 14:19:14.827288853 +0200 -@@ -2,6 +2,7 @@ - - from ctypes import * - import _ctypes_test -+import platform - - lib = CDLL(_ctypes_test.__file__) - -@@ -17,6 +18,8 @@ - import math - self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) - -+ @unittest.skipIf(platform.machine() in ['mips64'], -+ "This test fails on this platform") - def test_qsort(self): - comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) - lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_archive_util.py pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_archive_util.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_archive_util.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_archive_util.py 2020-05-21 14:19:14.827288853 +0200 -@@ -333,6 +333,7 @@ - self.assertEqual(os.path.basename(res), 'archive.tar.xz') - self.assertEqual(self._tarinfo(res), self._created_files) - -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_make_archive_owner_group(self): - # testing make_archive with owner and group, with various combinations - # this works even if there's not gid/uid support -@@ -362,6 +363,7 @@ - - @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") - @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_tarfile_root_owner(self): - tmpdir = self._create_files() - base_name = os.path.join(self.mkdtemp(), 'archive') -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_sdist.py pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_sdist.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_sdist.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_sdist.py 2020-05-21 14:19:14.827288853 +0200 -@@ -443,6 +443,7 @@ - "The tar command is not found") - @unittest.skipIf(find_executable('gzip') is None, - "The gzip command is not found") -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_make_distribution_owner_group(self): - # now building a sdist - dist, cmd = self.get_cmd() -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_asyncio/test_base_events.py pypy3.6-v7.3.1-src/lib-python/3/test/test_asyncio/test_base_events.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_asyncio/test_base_events.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_asyncio/test_base_events.py 2020-05-21 14:19:14.827288853 +0200 -@@ -1296,6 +1296,8 @@ - self._test_create_connection_ip_addr(m_socket, False) - - @patch_socket -+ @unittest.skipUnless(support.is_resource_enabled('network'), -+ 'network is not enabled') - def test_create_connection_service_name(self, m_socket): - m_socket.getaddrinfo = socket.getaddrinfo - sock = m_socket.socket.return_value -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_generators.py pypy3.6-v7.3.1-src/lib-python/3/test/test_generators.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_generators.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_generators.py 2020-05-21 14:19:14.827288853 +0200 -@@ -35,6 +35,7 @@ - else: - return "FAILED" - -+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment') - def test_raise_and_yield_from(self): - gen = self.generator1() - gen.send(None) -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/_test_multiprocessing.py pypy3.6-v7.3.1-src/lib-python/3/test/_test_multiprocessing.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/_test_multiprocessing.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/_test_multiprocessing.py 2020-05-21 14:19:14.827288853 +0200 -@@ -1212,6 +1212,7 @@ - if pid is not None: - os.kill(pid, signal.SIGINT) - -+ @unittest.skipIf(True, "This fails for unknown reasons on Guix") - def test_wait_result(self): - if isinstance(self, ProcessesMixin) and sys.platform != 'win32': - pid = os.getpid() -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_normalization.py pypy3.6-v7.3.1-src/lib-python/3/test/test_normalization.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_normalization.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_normalization.py 2020-05-21 14:19:14.827288853 +0200 -@@ -2,6 +2,7 @@ - import unittest - - from http.client import HTTPException -+from urllib.error import URLError - import sys - from unicodedata import normalize, unidata_version - -@@ -43,6 +44,8 @@ - except PermissionError: - self.skipTest(f"Permission error when downloading {TESTDATAURL} " - f"into the test data directory") -+ except URLError: -+ self.skipTest("DNS lookups are not enabled.") - except (OSError, HTTPException): - self.fail(f"Could not retrieve {TESTDATAURL}") - -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pathlib.py pypy3.6-v7.3.1-src/lib-python/3/test/test_pathlib.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pathlib.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_pathlib.py 2020-05-21 14:19:14.827288853 +0200 -@@ -2130,8 +2130,7 @@ - self.assertEqual(given, expect) - self.assertEqual(set(p.rglob("FILEd*")), set()) - -- @unittest.skipUnless(hasattr(pwd, 'getpwall'), -- 'pwd module does not expose getpwall()') -+ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests") - def test_expanduser(self): - P = self.cls - support.import_module('pwd') -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pdb.py pypy3.6-v7.3.1-src/lib-python/3/test/test_pdb.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pdb.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_pdb.py 2020-05-21 14:20:24.377203281 +0200 -@@ -1136,11 +1136,11 @@ - > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function() - -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) - (Pdb) continue -- pdb 1: <built-in function default_int_handler> -+ pdb 1: Handlers.SIG_IGN - > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function() - -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) - (Pdb) continue -- pdb 2: <built-in function default_int_handler> -+ pdb 2: Handlers.SIG_IGN - """ - - class PdbTestCase(unittest.TestCase): -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_regrtest.py pypy3.6-v7.3.1-src/lib-python/3/test/test_regrtest.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_regrtest.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_regrtest.py 2020-05-21 14:19:14.827288853 +0200 -@@ -766,6 +766,7 @@ - output = self.run_tests('--fromfile', filename) - self.check_executed_tests(output, tests) - -+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') - def test_interrupted(self): - code = TEST_INTERRUPTED - test = self.create_test('sigint', code=code) -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_resource.py pypy3.6-v7.3.1-src/lib-python/3/test/test_resource.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_resource.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_resource.py 2020-05-21 14:19:14.827288853 +0200 -@@ -146,6 +146,7 @@ - - @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit') - @support.requires_linux_version(2, 6, 36) -+ @unittest.skipIf(True, "Bug: the PermissionError is not raised") - def test_prlimit(self): - self.assertRaises(TypeError, resource.prlimit) - self.assertRaises(ProcessLookupError, resource.prlimit, -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_shutil.py pypy3.6-v7.3.1-src/lib-python/3/test/test_shutil.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_shutil.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_shutil.py 2020-05-21 14:19:14.827288853 +0200 -@@ -1138,6 +1138,7 @@ - self.assertRaises(ValueError, make_archive, base_name, 'xxx') - - @support.requires_zlib -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_make_archive_owner_group(self): - # testing make_archive with owner and group, with various combinations - # this works even if there's not gid/uid support -@@ -1166,6 +1167,7 @@ - - - @support.requires_zlib -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") - def test_tarfile_root_owner(self): - root_dir, base_dir = self._create_files() -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_socket.py pypy3.6-v7.3.1-src/lib-python/3/test/test_socket.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_socket.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_socket.py 2020-05-21 14:19:14.827288853 +0200 -@@ -815,6 +815,8 @@ - if not fqhn in all_host_names: - self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names))) - -+ @unittest.skipUnless(support.is_resource_enabled('network'), -+ 'network is not enabled') - def test_host_resolution(self): - for addr in [support.HOST, '10.0.0.1', '255.255.255.255']: - self.assertEqual(socket.gethostbyname(addr), addr) -@@ -934,6 +936,8 @@ - self.assertRaises(OverflowError, socket.htonl, k) - self.assertRaises(OverflowError, socket.htons, k) - -+ @unittest.skipUnless(os.path.exists("/etc/services"), -+ "getservbyname uses /etc/services, which is not in the chroot") - def testGetServBy(self): - eq = self.assertEqual - # Find one service that exists, then check all the related interfaces. -@@ -1278,6 +1282,8 @@ - raise - self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None) - -+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), -+ "getaddrinfo() will fail") - def testGetaddrinfo(self): - try: - socket.getaddrinfo('localhost', 80) -@@ -1357,6 +1363,8 @@ - # only IP addresses are allowed - self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0) - -+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), -+ "getaddrinfo() will fail") - @unittest.skipUnless(support.is_resource_enabled('network'), - 'network is not enabled') - def test_idna(self): -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_spwd.py pypy3.6-v7.3.1-src/lib-python/3/test/test_spwd.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_spwd.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_spwd.py 2020-05-21 14:19:14.827288853 +0200 -@@ -5,8 +5,7 @@ - spwd = support.import_module('spwd') - - --@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0, -- 'root privileges required') -+@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') - class TestSpwdRoot(unittest.TestCase): - - def test_getspall(self): -@@ -56,8 +55,7 @@ - self.assertRaises(TypeError, spwd.getspnam, bytes_name) - - --@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() != 0, -- 'non-root user required') -+@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') - class TestSpwdNonRoot(unittest.TestCase): - - def test_getspnam_exception(self): -diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_tarfile.py pypy3.6-v7.3.1-src/lib-python/3/test/test_tarfile.py ---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_tarfile.py 1970-01-01 01:00:01.000000000 +0100 -+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_tarfile.py 2020-05-21 14:19:14.827288853 +0200 -@@ -2491,9 +2491,12 @@ - import pwd, grp - except ImportError: - return False -- if pwd.getpwuid(0)[0] != 'root': -- return False -- if grp.getgrgid(0)[0] != 'root': -+ try: -+ if pwd.getpwuid(0)[0] != 'root': -+ return False -+ if grp.getgrgid(0)[0] != 'root': -+ return False -+ except KeyError: - return False - return True - diff --git a/gnu/packages/patches/python-chai-drop-python2.patch b/gnu/packages/patches/python-chai-drop-python2.patch new file mode 100644 index 0000000000..0eb980e5db --- /dev/null +++ b/gnu/packages/patches/python-chai-drop-python2.patch @@ -0,0 +1,32 @@ +Patch copied from Gentoo removing obsolete Python2 code. + +--- a/chai/chai.py ++++ b/chai/chai.py +@@ -62,11 +62,6 @@ + try: + func(self, *args, **kwargs) + except UnexpectedCall as e: +- # if this is not python3, use python2 syntax +- if not hasattr(e, '__traceback__'): +- from .python2 import reraise +- reraise( +- AssertionError, '\n\n' + str(e), sys.exc_info()[-1]) + exc = AssertionError('\n\n' + str(e)) + setattr(exc, '__traceback__', sys.exc_info()[-1]) + raise exc +--- a/chai/python2.py ++++ b/chai/python2.py +@@ -1,3 +0,0 @@ +- +-def reraise(exc, msg, traceback): +- raise exc, msg, traceback +--- a/chai.egg-info/SOURCES.txt ++++ b/chai.egg-info/SOURCES.txt +@@ -10,7 +10,6 @@ + chai/exception.py + chai/expectation.py + chai/mock.py +-chai/python2.py + chai/spy.py + chai/stub.py + chai.egg-info/PKG-INFO diff --git a/gnu/packages/patches/python-docopt-pytest6-compat.patch b/gnu/packages/patches/python-docopt-pytest6-compat.patch new file mode 100644 index 0000000000..acd4955778 --- /dev/null +++ b/gnu/packages/patches/python-docopt-pytest6-compat.patch @@ -0,0 +1,29 @@ +https://sources.debian.org/data/main/d/docopt/0.6.2-3/debian/patches/pytest6 + +From: Michael R. Crusoe <crusoe@debian.org> +Subject: fix for pytest 6.x comptability +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979285 + +--- docopt.orig/conftest.py ++++ docopt/conftest.py +@@ -11,6 +11,8 @@ + + def pytest_collect_file(path, parent): + if path.ext == ".docopt" and path.basename.startswith("test"): ++ if hasattr(DocoptTestFile, "from_parent"): ++ return DocoptTestFile.from_parent(parent, fspath=path) + return DocoptTestFile(path, parent) + + +@@ -41,7 +43,10 @@ + for name, doc, cases in parse_test(raw): + name = self.fspath.purebasename + for case in cases: +- yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case) ++ if hasattr(DocoptTestItem, "from_parent"): ++ yield DocoptTestItem.from_parent(self, name="%s(%d)" % (name, index), doc=doc, case=case) ++ else: ++ yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case) + index += 1 + + diff --git a/gnu/packages/patches/python-execnet-read-only-fix.patch b/gnu/packages/patches/python-execnet-read-only-fix.patch new file mode 100644 index 0000000000..58a4b129a7 --- /dev/null +++ b/gnu/packages/patches/python-execnet-read-only-fix.patch @@ -0,0 +1,77 @@ +From 0d6562a20b0610c5a83d1c66ac879223b84a2746 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer <maxim.cournoyer@gmail.com> +Date: Thu, 26 Aug 2021 00:43:26 -0400 +Subject: [PATCH] rsync_remote: Fix a problem when receiving read-only + directories. + +Before this change, when the source directories hierarchy was +read-only, the read-only mode would be preserved at the destination, +preventing child directories to be recreated by a normal user (a +permission denied error, EACCES would be raised). + +* execnet/rsync_remote.py (serve_rsync.receive_directory_structure): +Bitwise OR to ensure the write bit is set on received directories. +* testing/test_rsync.py (TestRSync) +<test_read_only_directories>: New test. +--- + execnet/rsync_remote.py | 8 ++++++-- + testing/test_rsync.py | 17 +++++++++++++++++ + 2 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/execnet/rsync_remote.py b/execnet/rsync_remote.py +index cd5e765..55d154c 100644 +--- a/execnet/rsync_remote.py ++++ b/execnet/rsync_remote.py +@@ -35,7 +35,11 @@ def serve_rsync(channel): + os.makedirs(path) + mode = msg.pop(0) + if mode: +- os.chmod(path, mode) ++ # Ensure directories are writable, otherwise a ++ # permission denied error (EACCES) would be raised ++ # when attempting to receive read-only directory ++ # structures. ++ os.chmod(path, mode | 0o700) + entrynames = {} + for entryname in msg: + destpath = os.path.join(path, entryname) +@@ -59,7 +63,7 @@ def serve_rsync(channel): + checksum = md5(f.read()).digest() + f.close() + elif msg_mode and msg_mode != st.st_mode: +- os.chmod(path, msg_mode) ++ os.chmod(path, msg_mode | 0o700) + return + else: + return # already fine +diff --git a/testing/test_rsync.py b/testing/test_rsync.py +index 995f229..1d6c30c 100644 +--- a/testing/test_rsync.py ++++ b/testing/test_rsync.py +@@ -157,6 +157,23 @@ class TestRSync: + mode = destdir.stat().mode + assert mode & 511 == 504 + ++ @py.test.mark.skipif("sys.platform == 'win32' or getattr(os, '_name', '') == 'nt'") ++ def test_read_only_directories(self, dirs, gw1): ++ source = dirs.source ++ dest = dirs.dest1 ++ source.ensure("sub", "subsub", dir=True) ++ source.join("sub").chmod(0o500) ++ source.join("sub", "subsub").chmod(0o500) ++ ++ # The destination directories should be created with the write ++ # permission forced, to avoid raising an EACCES error. ++ rsync = RSync(source) ++ rsync.add_target(gw1, dest) ++ rsync.send() ++ ++ assert dest.join("sub").stat().mode & 0o700 ++ assert dest.join("sub").join("subsub").stat().mode & 0o700 ++ + @needssymlink + def test_symlink_rsync(self, dirs, gw1): + source = dirs.source +-- +2.32.0 + diff --git a/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch b/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch new file mode 100644 index 0000000000..4ffe9b373d --- /dev/null +++ b/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch @@ -0,0 +1,59 @@ +https://sources.debian.org/data/main/p/python-fixtures/3.0.0-4/debian/patches/remove-broken-monkey-patch-test.patch + +The last release was May 2016. This can be removed when the next release happens. + +Description: Remove broken monkey patch tests +Author: Thomas Goirand <zigo@debian.org> +Bug-Debian: https://bugs.debian.org/973239 +Forwarded: no +Last-Update: 2020-11-12 + +--- python-fixtures-3.0.0.orig/fixtures/tests/_fixtures/test_monkeypatch.py ++++ python-fixtures-3.0.0/fixtures/tests/_fixtures/test_monkeypatch.py +@@ -181,22 +181,6 @@ class TestMonkeyPatch(testtools.TestCase + self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, + C, 'foo_cls') + +- def test_patch_classmethod_with_classmethod(self): +- oldmethod = C.foo_cls +- oldmethod_inst = C().foo_cls +- fixture = MonkeyPatch( +- 'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls', +- D.bar_cls_args) +- with fixture: +- cls, target_class = C.foo_cls() +- self.expectThat(cls, Is(D)) +- self.expectThat(target_class, Is(C)) +- cls, target_class = C().foo_cls() +- self.expectThat(cls, Is(D)) +- self.expectThat(target_class, Is(C)) +- self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, +- C, 'foo_cls') +- + def test_patch_classmethod_with_function(self): + oldmethod = C.foo_cls + oldmethod_inst = C().foo_cls +@@ -212,23 +196,6 @@ class TestMonkeyPatch(testtools.TestCase + self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, + C, 'foo_cls') + +- def test_patch_classmethod_with_boundmethod(self): +- oldmethod = C.foo_cls +- oldmethod_inst = C().foo_cls +- d = D() +- fixture = MonkeyPatch( +- 'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls', +- d.bar_two_args) +- with fixture: +- slf, cls = C.foo_cls() +- self.expectThat(slf, Is(d)) +- self.expectThat(cls, Is(C)) +- slf, cls = C().foo_cls() +- self.expectThat(slf, Is(d)) +- self.expectThat(cls, Is(C)) +- self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, +- C, 'foo_cls') +- + def test_patch_function_with_staticmethod(self): + oldmethod = fake_no_args + fixture = MonkeyPatch( diff --git a/gnu/packages/patches/python-mediafile-wavpack.patch b/gnu/packages/patches/python-mediafile-wavpack.patch deleted file mode 100644 index 9839fe87b5..0000000000 --- a/gnu/packages/patches/python-mediafile-wavpack.patch +++ /dev/null @@ -1,57 +0,0 @@ -This patch has already been applied upstream, but is not included in the -current release 0.6.0. - -From d2fc3b59f77c515b02dfe7ad936f89264375d2b4 Mon Sep 17 00:00:00 2001 -From: Adrian Sampson <adrian@radbox.org> -Date: Wed, 29 Jul 2020 19:42:57 -0400 -Subject: [PATCH] Fix test for WavPack bitrate - -Fixes #34. ---- - docs/index.rst | 5 +++++ - mediafile.py | 2 +- - test/test_mediafile.py | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/docs/index.rst b/docs/index.rst -index 7b622df..1465405 100644 ---- a/docs/index.rst -+++ b/docs/index.rst -@@ -100,6 +100,11 @@ Internals - Changelog - --------- - -+v0.7.0 -+'''''' -+ -+- Mutagen 1.45.0 or later is now required. -+ - v0.6.0 - '''''' - -diff --git a/mediafile.py b/mediafile.py -index 23fadaf..9e9d063 100644 ---- a/mediafile.py -+++ b/mediafile.py -@@ -56,7 +56,7 @@ - import six - - --__version__ = '0.6.0' -+__version__ = '0.7.0' - __all__ = ['UnreadableFileError', 'FileTypeError', 'MediaFile'] - - log = logging.getLogger(__name__) -diff --git a/test/test_mediafile.py b/test/test_mediafile.py -index e9e1850..7f17f44 100644 ---- a/test/test_mediafile.py -+++ b/test/test_mediafile.py -@@ -907,7 +907,7 @@ class WavpackTest(ReadWriteTestBase, unittest.TestCase): - 'bitrate': 109312, - 'format': u'WavPack', - 'samplerate': 44100, -- 'bitdepth': 0, -+ 'bitdepth': 16, - 'channels': 1, - } - diff --git a/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch b/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch new file mode 100644 index 0000000000..0b6a083fa3 --- /dev/null +++ b/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch @@ -0,0 +1,160 @@ +From ac1bd55d07fd1bad2f4a92dc0809607c407d9140 Mon Sep 17 00:00:00 2001 +From: "Maciej A. Czyzewski" <maciejanthonyczyzewski@gmail.com> +Date: Wed, 9 Jun 2021 15:29:18 +0200 +Subject: [PATCH] feature: new params for graphviz + solves #70 + +- solve abs path bug #70 +- new params for graphviz (ranksep; layout) +- tested layout `dot`; `fdp` (square graph) +- updated `.gitignore` (files gen. after `visualize_pyan_architecture.sh`) +--- + .gitignore | 5 ++++ + README.md | 6 ++-- + pyan/main.py | 55 +++++++++++++++++++++++++++++++--- + visualize_pyan_architecture.sh | 5 ++++ + 4 files changed, 64 insertions(+), 7 deletions(-) + +diff --git a/.gitignore b/.gitignore +index 990fdc0c..93313aaf 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -162,3 +162,8 @@ htmlcov + .idea/ + .history/ + .vscode/ ++ ++# our vis. of architecture ++architecture.dot ++architecture.html ++architecture.svg +diff --git a/README.md b/README.md +index d1f19dcf..9e6919a3 100644 +--- a/README.md ++++ b/README.md +@@ -48,7 +48,7 @@ See `pyan3 --help`. + + Example: + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --dot >myuses.dot` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --dot >myuses.dot` + + Then render using your favorite GraphViz filter, mainly `dot` or `fdp`: + +@@ -56,11 +56,11 @@ Then render using your favorite GraphViz filter, mainly `dot` or `fdp`: + + Or use directly + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --svg >myuses.svg` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --svg >myuses.svg` + + You can also export as an interactive HTML + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --html > myuses.html` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --html > myuses.html` + + Alternatively, you can call `pyan` from a script + +diff --git a/pyan/main.py b/pyan/main.py +index 5d079714..b1a16f63 100644 +--- a/pyan/main.py ++++ b/pyan/main.py +@@ -141,6 +141,31 @@ def main(cli_args=None): + ), + ) + ++ parser.add_argument( ++ "--dot-ranksep", ++ default="0.5", ++ dest="ranksep", ++ help=( ++ "specifies the dot graph 'ranksep' property for " ++ "controlling desired rank separation, in inches. " ++ "Allowed values: [0.02 .. 1000.0]. " ++ "[dot only]" ++ ), ++ ) ++ ++ parser.add_argument( ++ "--graphviz-layout", ++ default="dot", ++ dest="layout", ++ help=( ++ "specifies the graphviz 'layout' property for " ++ "the name of the layout algorithm to use. " ++ "Allowed values: ['dot', 'neato', 'fdp', 'sfdp', 'twopi', 'circo']. " ++ "Recommended values: ['dot', 'fdp']. " ++ "[graphviz only]" ++ ), ++ ) ++ + parser.add_argument( + "-a", + "--annotated", +@@ -159,7 +184,12 @@ def main(cli_args=None): + + known_args, unknown_args = parser.parse_known_args(cli_args) + +- filenames = [fn2 for fn in unknown_args for fn2 in glob(fn, recursive=True)] ++ ++ filenames = [] ++ for fn in unknown_args: ++ for fn2 in glob(fn, recursive=True): ++ abs_fn2 = os.path.abspath(fn2) ++ filenames.append(abs_fn2) + + # determine root + if known_args.root is not None: +@@ -203,6 +233,11 @@ def main(cli_args=None): + handler = logging.FileHandler(known_args.logname) + logger.addHandler(handler) + ++ logger.debug(f"[files] {unknown_args}") ++ ++ if root: ++ root = os.path.abspath(root) ++ + v = CallGraphVisitor(filenames, logger=logger, root=root) + + if known_args.function or known_args.namespace: +@@ -222,13 +257,25 @@ def main(cli_args=None): + writer = None + + if known_args.dot: +- writer = DotWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = DotWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.html: +- writer = HTMLWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = HTMLWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.svg: +- writer = SVGWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = SVGWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.tgf: + writer = TgfWriter(graph, output=known_args.filename, logger=logger) +diff --git a/visualize_pyan_architecture.sh b/visualize_pyan_architecture.sh +index 22c63342..81b6ca24 100755 +--- a/visualize_pyan_architecture.sh ++++ b/visualize_pyan_architecture.sh +@@ -2,3 +2,8 @@ + echo -ne "Pyan architecture: generating architecture.{dot,svg}\n" + python3 -m pyan pyan/*.py --no-defines --uses --colored --annotate --dot -V >architecture.dot 2>architecture.log + dot -Tsvg architecture.dot >architecture.svg ++echo -ne "Pyan architecture: generating architecture.{html,graphviz=fdp}\n" ++python3 -m pyan pyan/*.py --no-defines --uses \ ++ --grouped --nested-groups \ ++ --graphviz-layout fdp \ ++ --colored --html > architecture.html diff --git a/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch b/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch new file mode 100644 index 0000000000..81923d7a41 --- /dev/null +++ b/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch @@ -0,0 +1,22 @@ +From 37404bb039bd9c5509b4aec8f61e360dfba50715 Mon Sep 17 00:00:00 2001 +From: Wenxin Ling <w.ling@mediaire.de> +Date: Mon, 1 Mar 2021 15:21:16 +0100 +Subject: [PATCH] Fix positional arguments issue for CallGraphVisitor + +--- + pyan/main.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyan/main.py b/pyan/main.py +index 18821a14..5d079714 100644 +--- a/pyan/main.py ++++ b/pyan/main.py +@@ -203,7 +203,7 @@ def main(cli_args=None): + handler = logging.FileHandler(known_args.logname) + logger.addHandler(handler) + +- v = CallGraphVisitor(filenames, logger, root=root) ++ v = CallGraphVisitor(filenames, logger=logger, root=root) + + if known_args.function or known_args.namespace: + diff --git a/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch b/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch new file mode 100644 index 0000000000..519f92c047 --- /dev/null +++ b/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch @@ -0,0 +1,238 @@ +# Modified to apply on 0.10.0. + +From c7a111180b3f35f2fe5a07ead185e4e792f9dfa0 Mon Sep 17 00:00:00 2001 +From: Andrew Svetlov <andrew.svetlov@gmail.com> +Date: Thu, 9 Apr 2020 08:44:46 +0200 +Subject: [PATCH] Test on Python 3.8, drop 3.3 and 3.4 + +--- + .travis.yml | 7 +++--- + setup.py | 1 + + tests/conftest.py | 2 +- + tests/test_hypothesis_integration.py | 2 +- + tests/test_simple.py | 32 +++++++++++----------------- + tests/test_simple_35.py | 17 ++++++--------- + tests/test_subprocess.py | 6 ++---- + tox.ini | 5 +++-- + 8 files changed, 29 insertions(+), 43 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index fe90234..b93377a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -1,4 +1,5 @@ + language: python ++ + matrix: + include: + - python: 3.5 +@@ -7,10 +8,8 @@ matrix: + env: TOX_ENV=py36 + - python: 3.7 + env: TOX_ENV=py37 +- # TODO: the dist and sudo keys are currently needed to use Python 3.7. +- # They should be removed once Travis-CI supports 3.7 on the default image. +- dist: xenial +- sudo: true ++ - python: 3.8 ++ env: TOX_ENV=py38 + + install: pip install tox-travis coveralls + +diff --git a/setup.py b/setup.py +index 18566bf..6175711 100644 +--- a/setup.py ++++ b/setup.py +@@ -36,6 +36,7 @@ def find_version(): + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", ++ "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Testing", + "Framework :: Pytest", + ], +diff --git a/tests/conftest.py b/tests/conftest.py +index 6203cf8..cc2ec16 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -17,7 +17,7 @@ def dependent_fixture(event_loop): + async def just_a_sleep(): + """Just sleep a little while.""" + nonlocal event_loop +- await asyncio.sleep(0.1, loop=event_loop) ++ await asyncio.sleep(0.1) + nonlocal counter + counter += 1 + +diff --git a/tests/test_simple.py b/tests/test_simple.py +index 1627139..00c07fc 100644 +--- a/tests/test_simple.py ++++ b/tests/test_simple.py +@@ -1,28 +1,26 @@ + """Quick'n'dirty unit tests for provided fixtures and markers.""" + import asyncio +-import os + import pytest + + import pytest_asyncio.plugin + + +-async def async_coro(loop=None): +- """A very simple coroutine.""" +- await asyncio.sleep(0, loop=loop) ++async def async_coro(): ++ await asyncio.sleep(0) + return 'ok' + + + def test_event_loop_fixture(event_loop): + """Test the injection of the event_loop fixture.""" + assert event_loop +- ret = event_loop.run_until_complete(async_coro(event_loop)) ++ ret = event_loop.run_until_complete(async_coro()) + assert ret == 'ok' + + + @pytest.mark.asyncio +-def test_asyncio_marker(): ++async def test_asyncio_marker(): + """Test the asyncio pytest marker.""" +- yield # sleep(0) ++ await asyncio.sleep(0) + + + @pytest.mark.xfail(reason='need a failure', strict=True) +@@ -45,13 +43,11 @@ async def closer(_, writer): + writer.close() + + server1 = await asyncio.start_server(closer, host='localhost', +- port=unused_tcp_port, +- loop=event_loop) ++ port=unused_tcp_port) + + with pytest.raises(IOError): + await asyncio.start_server(closer, host='localhost', +- port=unused_tcp_port, +- loop=event_loop) ++ port=unused_tcp_port) + + server1.close() + await server1.wait_closed() +@@ -68,20 +64,16 @@ async def closer(_, writer): + unused_tcp_port_factory()) + + server1 = await asyncio.start_server(closer, host='localhost', +- port=port1, +- loop=event_loop) ++ port=port1) + server2 = await asyncio.start_server(closer, host='localhost', +- port=port2, +- loop=event_loop) ++ port=port2) + server3 = await asyncio.start_server(closer, host='localhost', +- port=port3, +- loop=event_loop) ++ port=port3) + + for port in port1, port2, port3: + with pytest.raises(IOError): + await asyncio.start_server(closer, host='localhost', +- port=port, +- loop=event_loop) ++ port=port) + + server1.close() + await server1.wait_closed() +@@ -117,7 +109,7 @@ class Test: + @pytest.mark.asyncio + async def test_asyncio_marker_method(self, event_loop): + """Test the asyncio pytest marker in a Test class.""" +- ret = await async_coro(event_loop) ++ ret = await async_coro() + assert ret == 'ok' + + +diff --git a/tests/test_simple_35.py b/tests/test_simple_35.py +index 1e4d697..4141fb0 100644 +--- a/tests/test_simple_35.py ++++ b/tests/test_simple_35.py +@@ -6,7 +6,7 @@ + + @pytest.mark.asyncio + async def async_coro(loop): +- await asyncio.sleep(0, loop=loop) ++ await asyncio.sleep(0) + return 'ok' + + +@@ -27,8 +27,7 @@ async def closer(_, writer): + writer.close() + + server1 = await asyncio.start_server(closer, host='localhost', +- port=unused_tcp_port, +- loop=event_loop) ++ port=unused_tcp_port) + + server1.close() + await server1.wait_closed() +@@ -45,20 +44,16 @@ async def closer(_, writer): + + async def run_test(): + server1 = await asyncio.start_server(closer, host='localhost', +- port=port1, +- loop=event_loop) ++ port=port1) + server2 = await asyncio.start_server(closer, host='localhost', +- port=port2, +- loop=event_loop) ++ port=port2) + server3 = await asyncio.start_server(closer, host='localhost', +- port=port3, +- loop=event_loop) ++ port=port3) + + for port in port1, port2, port3: + with pytest.raises(IOError): + await asyncio.start_server(closer, host='localhost', +- port=port, +- loop=event_loop) ++ port=port) + + server1.close() + await server1.wait_closed() +diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py +index 83490e8..069c6c2 100644 +--- a/tests/test_subprocess.py ++++ b/tests/test_subprocess.py +@@ -21,8 +21,7 @@ def event_loop(): + async def test_subprocess(event_loop): + """Starting a subprocess should be possible.""" + proc = await asyncio.subprocess.create_subprocess_exec( +- sys.executable, '--version', stdout=asyncio.subprocess.PIPE, +- loop=event_loop) ++ sys.executable, '--version', stdout=asyncio.subprocess.PIPE) + await proc.communicate() + + +@@ -30,6 +29,5 @@ async def test_subprocess(event_loop): + async def test_subprocess_forbid(event_loop): + """Starting a subprocess should be possible.""" + proc = await asyncio.subprocess.create_subprocess_exec( +- sys.executable, '--version', stdout=asyncio.subprocess.PIPE, +- loop=event_loop) ++ sys.executable, '--version', stdout=asyncio.subprocess.PIPE) + await proc.communicate() +diff --git a/tox.ini b/tox.ini +index 13d5155..eed6fb6 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -1,6 +1,7 @@ + [tox] +-envlist = py35, py36, py37 +-minversion = 2.5.0 ++minversion = 3.14.0 ++envlist = py35, py36, py37, py38 ++skip_missing_interpreters = true + + [testenv] + extras = testing diff --git a/gnu/packages/patches/python-pytorch-runpath.patch b/gnu/packages/patches/python-pytorch-runpath.patch new file mode 100644 index 0000000000..6f270ef9b1 --- /dev/null +++ b/gnu/packages/patches/python-pytorch-runpath.patch @@ -0,0 +1,25 @@ +Libraries (such as 'libtorch_cpu.so') and executables (such as 'torch_shm_manager') +get installed, quite surprisingly, to 'lib/python3.8/site-packages/{bin,lib}'. +Make sure RUNPATH matches that. + +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -4,7 +4,7 @@ if(APPLE) + set(CMAKE_MACOSX_RPATH ON) + set(_rpath_portable_origin "@loader_path") + else() +- set(_rpath_portable_origin $ORIGIN) ++ set(_rpath_portable_origin $ORIGIN/../lib) + endif(APPLE) + # Use separate rpaths during build and install phases + set(CMAKE_SKIP_BUILD_RPATH FALSE) + +--- a/caffe2/CMakeLists.txt ++++ b/caffe2/CMakeLists.txt +@@ -1797,5 +1797,5 @@ if(BUILD_PYTHON) + if(${BUILDING_WITH_TORCH_LIBS}) + # site-packages/caffe2/python/caffe2_pybind11_state + # site-packages/torch/lib +- set(caffe2_pybind11_rpath "${_rpath_portable_origin}/../../torch/lib") ++ set(caffe2_pybind11_rpath $ORIGIN/../../torch/lib) + endif(${BUILDING_WITH_TORCH_LIBS}) diff --git a/gnu/packages/patches/python-pytorch-system-libraries.patch b/gnu/packages/patches/python-pytorch-system-libraries.patch new file mode 100644 index 0000000000..c8d14b3f56 --- /dev/null +++ b/gnu/packages/patches/python-pytorch-system-libraries.patch @@ -0,0 +1,131 @@ +Use our own googletest rather than the bundled one. +Get NNPACK to use our own PeachPy rather than the bundled one. + +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index 5d57b9ca78..620cca4e60 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -644,11 +644,6 @@ if(BUILD_TEST OR BUILD_MOBILE_BENCHMARK OR BUILD_MOBILE_TEST) + # this shouldn't be necessary anymore. + get_property(INC_DIR_temp DIRECTORY PROPERTY INCLUDE_DIRECTORIES) + set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "") +- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/googletest) +- set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${INC_DIR_temp}) +- +- include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/googletest/googletest/include) +- include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/googletest/googlemock/include) + + # We will not need to test benchmark lib itself. + set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable benchmark testing as we don't need it.") +@@ -1485,7 +1480,7 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX) + endif() + set_property(TARGET onnx_proto PROPERTY IMPORTED_LOCATION ${ONNX_PROTO_LIBRARY}) + message("-- Found onnx: ${ONNX_LIBRARY} ${ONNX_PROTO_LIBRARY}") +- list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx) ++ list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx onnx_optimizer) + endif() + include_directories(${FOXI_INCLUDE_DIRS}) + list(APPEND Caffe2_DEPENDENCY_LIBS foxi_loader) + +diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt +index 50ebb224ce..5953d9ddf7 100644 +--- a/caffe2/CMakeLists.txt ++++ b/caffe2/CMakeLists.txt +@@ -1632,7 +1632,7 @@ if(BUILD_TEST) + if(NOT MSVC) + add_executable(${test_name}_${CPU_CAPABILITY} "${test_src}" ../aten/src/ATen/native/quantized/affine_quantizer_base.cpp) + # TODO: Get rid of c10 dependency (which is only needed for the implementation of AT_ERROR) +- target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main) ++ target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main gtest) + if(USE_FBGEMM) + target_link_libraries(${test_name}_${CPU_CAPABILITY} fbgemm) + endif() +@@ -1655,7 +1655,7 @@ if(BUILD_TEST) + foreach(test_src ${Caffe2_CPU_TEST_SRCS}) + get_filename_component(test_name ${test_src} NAME_WE) + add_executable(${test_name} "${test_src}") +- target_link_libraries(${test_name} torch_library gtest_main) ++ target_link_libraries(${test_name} torch_library gtest_main gtest) + target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>) + target_include_directories(${test_name} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>) + target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE}) +@@ -1673,7 +1673,7 @@ if(BUILD_TEST) + foreach(test_src ${Caffe2_GPU_TEST_SRCS}) + get_filename_component(test_name ${test_src} NAME_WE) + cuda_add_executable(${test_name} "${test_src}") +- target_link_libraries(${test_name} torch_library gtest_main) ++ target_link_libraries(${test_name} torch_library gtest_main gtest) + target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>) + target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE}) + add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>) +@@ -1691,7 +1691,7 @@ if(BUILD_TEST) + foreach(test_src ${Caffe2_VULKAN_TEST_SRCS}) + get_filename_component(test_name ${test_src} NAME_WE) + add_executable(${test_name} "${test_src}") +- target_link_libraries(${test_name} torch_library gtest_main) ++ target_link_libraries(${test_name} torch_library gtest_main gtest) + target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>) + target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE}) + add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>) +@@ -1709,7 +1709,7 @@ if(BUILD_TEST) + foreach(test_src ${Caffe2_HIP_TEST_SRCS}) + get_filename_component(test_name ${test_src} NAME_WE) + add_executable(${test_name} "${test_src}") +- target_link_libraries(${test_name} torch_library gtest_main) ++ target_link_libraries(${test_name} torch_library gtest_main gtest) + target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>) + target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE} ${Caffe2_HIP_INCLUDE}) + target_compile_options(${test_name} PRIVATE ${HIP_CXX_FLAGS}) + +diff --git a/torch/lib/c10d/test/CMakeLists.txt b/torch/lib/c10d/test/CMakeLists.txt +index b74d4b65f7..fc7c207505 100644 +--- a/torch/lib/c10d/test/CMakeLists.txt ++++ b/torch/lib/c10d/test/CMakeLists.txt +@@ -16,25 +16,25 @@ function(c10d_add_test test_src) + add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>) + endfunction() + +-c10d_add_test(FileStoreTest.cpp c10d gtest_main) +-c10d_add_test(TCPStoreTest.cpp c10d gtest_main) ++c10d_add_test(FileStoreTest.cpp c10d gtest_main gtest) ++c10d_add_test(TCPStoreTest.cpp c10d gtest_main gtest) + if(NOT WIN32) +- c10d_add_test(HashStoreTest.cpp c10d gtest_main) ++ c10d_add_test(HashStoreTest.cpp c10d gtest_main gtest) + endif() + + if(USE_CUDA) + if(USE_C10D_GLOO) +- c10d_add_test(ProcessGroupGlooTest.cpp c10d c10d_cuda_test gtest_main) +- c10d_add_test(ProcessGroupGlooAsyncTest.cpp c10d c10d_cuda_test gtest_main) ++ c10d_add_test(ProcessGroupGlooTest.cpp c10d c10d_cuda_test gtest_main gtest) ++ c10d_add_test(ProcessGroupGlooAsyncTest.cpp c10d c10d_cuda_test gtest_main gtest) + endif() + if(USE_C10D_NCCL) +- c10d_add_test(ProcessGroupNCCLTest.cpp c10d c10d_cuda_test gtest_main) ++ c10d_add_test(ProcessGroupNCCLTest.cpp c10d c10d_cuda_test gtest_main gtest) + c10d_add_test(ProcessGroupNCCLErrorsTest.cpp c10d c10d_cuda_test +- gtest_main) ++ gtest_main gtest) + endif() + else() + if(USE_C10D_GLOO) +- c10d_add_test(ProcessGroupGlooTest.cpp c10d gtest_main) ++ c10d_add_test(ProcessGroupGlooTest.cpp c10d gtest_main gtest) + endif() + endif() + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ecd2df..24feae3 100644 +--- a/third_party/NNPACK/CMakeLists.txt ++++ b/third_party/NNPACK/CMakeLists.txt +@@ -427,8 +427,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64") + FILE(MAKE_DIRECTORY ${obj_dir}) + ADD_CUSTOM_COMMAND( + OUTPUT ${obj} +- COMMAND "PYTHONPATH=${PEACHPY_PYTHONPATH}" +- ${PYTHON_EXECUTABLE} -m peachpy.x86_64 ++ COMMAND ${PYTHON_EXECUTABLE} -m peachpy.x86_64 + -mabi=sysv -g4 -mimage-format=${PEACHPY_IMAGE_FORMAT} + "-I${PROJECT_SOURCE_DIR}/src" "-I${PROJECT_SOURCE_DIR}/src/x86_64-fma" "-I${FP16_SOURCE_DIR}/include" + -o ${obj} "${PROJECT_SOURCE_DIR}/${src}" diff --git a/gnu/packages/patches/python-random2-getrandbits-test.patch b/gnu/packages/patches/python-random2-getrandbits-test.patch new file mode 100644 index 0000000000..4f6c56027a --- /dev/null +++ b/gnu/packages/patches/python-random2-getrandbits-test.patch @@ -0,0 +1,23 @@ +From 1bac6355d9c65de847cc445d782c466778b94fbd Mon Sep 17 00:00:00 2001 +From: "Robert T. McGibbon" <rmcgibbo@gmail.com> +Date: Sun, 9 May 2021 11:18:23 -0400 +Subject: [PATCH] Update tests for python3.9 + +--- + src/tests.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/tests.py b/src/tests.py +index d918891..4f2c3de 100644 +--- a/src/tests.py ++++ b/src/tests.py +@@ -448,7 +448,8 @@ def test_genrandbits(self): + self.assertRaises(TypeError, self.gen.getrandbits) + self.assertRaises(TypeError, self.gen.getrandbits, 'a') + self.assertRaises(TypeError, self.gen.getrandbits, 1, 2) +- self.assertRaises(ValueError, self.gen.getrandbits, 0) ++ if sys.version_info < (3, 9): ++ self.assertRaises(ValueError, self.gen.getrandbits, 0) + self.assertRaises(ValueError, self.gen.getrandbits, -1) + + def test_randbelow_logic(self, _log=log, int=int): diff --git a/gnu/packages/patches/python-testtools.patch b/gnu/packages/patches/python-testtools.patch deleted file mode 100644 index 42536e50f9..0000000000 --- a/gnu/packages/patches/python-testtools.patch +++ /dev/null @@ -1,57 +0,0 @@ -https://github.com/testing-cabal/testtools/commit/29004731f9c480b7c44a9c2605513d50d372898f.patch -Should be fixed in the next release - -From 29004731f9c480b7c44a9c2605513d50d372898f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> -Date: Thu, 17 May 2018 17:52:26 +0200 -Subject: [PATCH] Fix the tests on Python 3.7 - -Exception's repr got changed not to include trailing comma - -Fixes https://github.com/testing-cabal/testtools/issues/270 ---- - .travis.yml | 1 + - testtools/tests/matchers/test_exception.py | 11 +++++++++-- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/.travis.yml b/.travis.yml -index 7f1f4db7..784608e0 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -5,6 +5,7 @@ python: - - "3.4" - - "3.5" - - "3.6" -+ - "3.7-dev" - - "pypy" - - install: -diff --git a/testtools/tests/matchers/test_exception.py b/testtools/tests/matchers/test_exception.py -index 6cd80af1..acd39252 100644 ---- a/testtools/tests/matchers/test_exception.py -+++ b/testtools/tests/matchers/test_exception.py -@@ -32,15 +32,22 @@ class TestMatchesExceptionInstanceInterface(TestCase, TestMatchersInterface): - matches_matches = [error_foo] - matches_mismatches = [error_bar, error_base_foo] - -+ if sys.version_info >= (3, 7): -+ # exception's repr has changed -+ _e = '' -+ else: -+ _e = ',' -+ - str_examples = [ -- ("MatchesException(Exception('foo',))", -+ ("MatchesException(Exception('foo'%s))" % _e, - MatchesException(Exception('foo'))) - ] - describe_examples = [ - ("%r is not a %r" % (Exception, ValueError), - error_base_foo, - MatchesException(ValueError("foo"))), -- ("ValueError('bar',) has different arguments to ValueError('foo',).", -+ ("ValueError('bar'%s) has different arguments to ValueError('foo'%s)." -+ % (_e, _e), - error_bar, - MatchesException(ValueError("foo"))), - ] diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch b/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch new file mode 100644 index 0000000000..ddaf8e2849 --- /dev/null +++ b/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch @@ -0,0 +1,54 @@ +Fix build with Bison 3.7 + +https://bugs.gentoo.org/736499 + +Patch copied from upstream source repository: + +https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31 + +From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev <mitya57@gmail.com> +Date: Tue, 4 Aug 2020 21:04:06 +0300 +Subject: [PATCH] Let Bison generate the header directly, to fix build with + Bison 3.7 + +Starting with Bison 3.7, the generated C++ file #include's the header +by default, instead of duplicating it. So we should not delete it. + +Remove the code to add #ifdef guards to the header, since Bison adds +them itself since version 2.6.3. +--- + Source/WebCore/css/makegrammar.pl | 21 +-------------------- + 1 file changed, 1 insertion(+), 20 deletions(-) + +diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl +index 5d63b08102eb5..9435701c70612 100644 +--- a/Source/WebCore/css/makegrammar.pl ++++ b/Source/WebCore/css/makegrammar.pl +@@ -73,25 +73,6 @@ + } + + my $fileBase = File::Spec->join($outputDir, $filename); +-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); ++my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); + push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives. + system(@bisonCommand) == 0 or die; +- +-open HEADER, ">$fileBase.h" or die; +-print HEADER << "EOF"; +-#ifndef CSSGRAMMAR_H +-#define CSSGRAMMAR_H +-EOF +- +-open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die; +-while (<HPP>) { +- print HEADER; +-} +-close HPP; +- +-print HEADER "#endif\n"; +-close HEADER; +- +-unlink("$fileBase.cpp.h"); +-unlink("$fileBase.hpp"); +- diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch b/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch new file mode 100644 index 0000000000..63840f4bbc --- /dev/null +++ b/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch @@ -0,0 +1,21 @@ +Fix building with glib 2.68: + +https://github.com/qtwebkit/qtwebkit/issues/1057 + +Patch copied from upstream pull request: + +https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b + +diff -aurN qtwebkit-5.212.0-alpha4/Source/WTF/wtf/glib/GRefPtr.h qtwebkit-5.212.0-alpha4-mod/Source/WTF/wtf/glib/GRefPtr.h +--- qtwebkit-5.212.0-alpha4/Source/WTF/wtf/glib/GRefPtr.h 2020-03-04 18:16:37.000000000 +0100 ++++ qtwebkit-5.212.0-alpha4-mod/Source/WTF/wtf/glib/GRefPtr.h 2021-04-05 06:58:44.763328636 +0200 +@@ -29,9 +29,6 @@ + #include <wtf/RefPtr.h> + #include <algorithm> + +-extern "C" void g_object_unref(gpointer); +-extern "C" gpointer g_object_ref_sink(gpointer); +- + namespace WTF { + + enum GRefPtrAdoptType { GRefPtrAdopt }; diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch b/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch new file mode 100644 index 0000000000..acbfc4c4c8 --- /dev/null +++ b/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch @@ -0,0 +1,152 @@ +Fix building with ICU > 68. + +https://bugs.gentoo.org/753260 + +Patch adapted from Gentoo: + +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=335f29d266c5b169ff1e781f9851a3a203f3198c + +From 335f29d266c5b169ff1e781f9851a3a203f3198c Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Fri, 6 Nov 2020 09:22:15 +0100 +Subject: dev-qt/qtwebkit: Fix build with ICU-68 + +Thanks-to: Lars Wendler <polynomial-c@gentoo.org> +Closes: https://bugs.gentoo.org/753260 +Package-Manager: Portage-3.0.9, Repoman-3.0.2 +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + .../qtwebkit-5.212.0_pre20200309-icu-68.patch | 120 +++++++++++++++++++++ + 1 file changed, 120 insertions(+) + create mode 100644 dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-icu-68.patch + +(limited to 'dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-icu-68.patch') + +diff --git a/Source/WebCore/platform/text/TextCodecICU.cpp b/Source/WebCore/platform/text/TextCodecICU.cpp +index dd6ff06..e0f4bd7 100644 +--- a/Source/WebCore/platform/text/TextCodecICU.cpp ++++ b/Source/WebCore/platform/text/TextCodecICU.cpp +@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const + m_converterICU = ucnv_open(m_canonicalConverterName, &err); + ASSERT(U_SUCCESS(err)); + if (m_converterICU) +- ucnv_setFallback(m_converterICU, TRUE); ++ ucnv_setFallback(m_converterICU, true); + } + + int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err) +diff --git a/Source/WebCore/platform/text/icu/UTextProvider.h b/Source/WebCore/platform/text/icu/UTextProvider.h +index c254fc4..6d1e1cb 100644 +--- a/Source/WebCore/platform/text/icu/UTextProvider.h ++++ b/Source/WebCore/platform/text/icu/UTextProvider.h +@@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) { + text->chunkOffset = text->chunkLength; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } else { +@@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex <= 0 && !text->chunkNativeStart) { + text->chunkOffset = 0; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } +diff --git a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp +index cd6852c..6a864b1 100644 +--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp +@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward) + if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (index >= length && uText->chunkNativeLimit == length) { + // Off the end of the buffer, but we can't get it. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return FALSE; ++ return false; + } + } else { + if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (!index && !uText->chunkNativeStart) { + // Already at the beginning; can't go any farther. + uText->chunkOffset = 0; +- return FALSE; ++ return false; + } + } + +@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward) + + uText->nativeIndexingLimit = uText->chunkLength; + +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status) +@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UText* text) + static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBo + ASSERT(newContext == UTextProviderContext::PriorContext); + textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) +diff --git a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp +index 7aaac48..9ae0d36 100644 +--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp +@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLength(UText* text) + static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBoo + ASSERT(newContext == UTextProviderContext::PriorContext); + textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch b/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch new file mode 100644 index 0000000000..9f9674de33 --- /dev/null +++ b/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch @@ -0,0 +1,35 @@ +Fix building with Python 3.9: + +https://github.com/qtwebkit/qtwebkit/issues/993 + +Patch copied from upstream source repository: + +https://github.com/qtwebkit/qtwebkit/commit/78360c01c796b6260bf828bc9c8a0ef73c5132fd + +From 78360c01c796b6260bf828bc9c8a0ef73c5132fd Mon Sep 17 00:00:00 2001 +From: Konstantin Tokarev <annulen@yandex.ru> +Date: Wed, 3 Jun 2020 15:01:42 +0300 +Subject: [PATCH] Fix compilation with Python 3.9: avoid passing encoding to + json.load() + +In Python 2.7 UTF-8 is assumed by default, while in Python 3 this argument +is not supported. + +Change-Id: Ic459d60a6b20bc1838d8771bc36ac41614fe61a9 +--- + Source/JavaScriptCore/generate-bytecode-files | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files +index c5dab429c7b0f..af3431275ecf9 100644 +--- a/Source/JavaScriptCore/generate-bytecode-files ++++ b/Source/JavaScriptCore/generate-bytecode-files +@@ -163,7 +163,7 @@ if __name__ == "__main__": + initBytecodesFile = openOrExit(initASMFileName, "w") + + try: +- bytecodeSections = json.load(bytecodeFile, encoding = "utf-8") ++ bytecodeSections = json.load(bytecodeFile) + except: + print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())) + diff --git a/gnu/packages/patches/racket-minimal-backport-1629887.patch b/gnu/packages/patches/racket-minimal-backport-1629887.patch new file mode 100644 index 0000000000..aa060ef5aa --- /dev/null +++ b/gnu/packages/patches/racket-minimal-backport-1629887.patch @@ -0,0 +1,28 @@ +From fb1a6ab205fd63a46669a463931af473e2ac0c87 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt <mflatt@racket-lang.org> +Date: Sat, 21 Aug 2021 15:29:59 -0600 +Subject: [PATCH] setup/variant: recognize starter executables + +Related to #3969 + +(cherry picked from commit 1629887071fe3cc8fe8af0a7aa0d3912509cb058) +--- + racket/collects/setup/variant.rkt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/racket/collects/setup/variant.rkt b/racket/collects/setup/variant.rkt +index 81da6f5701..b23131e481 100644 +--- a/racket/collects/setup/variant.rkt ++++ b/racket/collects/setup/variant.rkt +@@ -25,7 +25,7 @@ + (and (file-exists? f) + (with-input-from-file f + (lambda () +- (define m (regexp-match #rx#"bINARy tYPe:..(.)" ++ (define m (regexp-match #rx#"bINARy tYPe:e?..(.)" + (current-input-port))) + (cond + [(not m) '3m] +-- +2.30.2 + diff --git a/gnu/packages/patches/racket-sh-via-rktio.patch b/gnu/packages/patches/racket-minimal-sh-via-rktio.patch index b4fefd1514..6bc2ee8331 100644 --- a/gnu/packages/patches/racket-sh-via-rktio.patch +++ b/gnu/packages/patches/racket-minimal-sh-via-rktio.patch @@ -35,13 +35,13 @@ making this change at the C level is both: conditional and a runtime check that the file in the store exists, we make it much less likely that it will "leak" out of Guix. --- - src/rktio/rktio_process.c | 21 ++++++++++++++++++++- + racket/src/rktio/rktio_process.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) -diff --git a/src/rktio/rktio_process.c b/src/rktio/rktio_process.c +diff --git a/racket/src/rktio/rktio_process.c b/racket/src/rktio/rktio_process.c index 89202436c0..465ebdd5c5 100644 ---- a/src/rktio/rktio_process.c -+++ b/src/rktio/rktio_process.c +--- a/racket/src/rktio/rktio_process.c ++++ b/racket/src/rktio/rktio_process.c @@ -1224,12 +1224,14 @@ int rktio_process_allowed_flags(rktio_t *rktio) /*========================================================================*/ diff --git a/gnu/packages/patches/rapidjson-gcc-compat.patch b/gnu/packages/patches/rapidjson-gcc-compat.patch index b5ffc0a908..8bfdb075d9 100644 --- a/gnu/packages/patches/rapidjson-gcc-compat.patch +++ b/gnu/packages/patches/rapidjson-gcc-compat.patch @@ -16,3 +16,51 @@ index 422a5240..d4039716 100644 #endif #ifdef _MSC_VER + +Cast destination pointers to avoid a GCC error about memmove writing to +a different type. + +Adapted from this upstream commit: +https://github.com/Tencent/rapidjson/commit/fa5963a2f5b231ee2babff771f169ccca22870ed + +diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h +--- a/include/rapidjson/document.h ++++ b/include/rapidjson/document.h +@@ -1425,7 +1425,7 @@ public: + MemberIterator pos = MemberBegin() + (first - MemberBegin()); + for (MemberIterator itr = pos; itr != last; ++itr) + itr->~Member(); +- std::memmove(&*pos, &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member)); ++ std::memmove(static_cast<void*>(&*pos), &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member)); + data_.o.size -= static_cast<SizeType>(last - first); + return pos; + } +@@ -1628,8 +1628,8 @@ public: + RAPIDJSON_ASSERT(last <= End()); + ValueIterator pos = Begin() + (first - Begin()); + for (ValueIterator itr = pos; itr != last; ++itr) +- itr->~GenericValue(); +- std::memmove(pos, last, static_cast<size_t>(End() - last) * sizeof(GenericValue)); ++ itr->~GenericValue(); ++ std::memmove(static_cast<void*>(pos), last, static_cast<size_t>(End() - last) * sizeof(GenericValue)); + data_.a.size -= static_cast<SizeType>(last - first); + return pos; + } +@@ -1936,7 +1936,7 @@ private: + if (count) { + GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue))); + SetElementsPointer(e); +- std::memcpy(e, values, count * sizeof(GenericValue)); ++ std::memcpy(static_cast<void*>(e), values, count * sizeof(GenericValue)); + } + else + SetElementsPointer(0); +@@ -1949,7 +1949,7 @@ private: + if (count) { + Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member))); + SetMembersPointer(m); +- std::memcpy(m, members, count * sizeof(Member)); ++ std::memcpy(static_cast<void*>(m), members, count * sizeof(Member)); + } + else + SetMembersPointer(0); diff --git a/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch new file mode 100644 index 0000000000..cc510c1cfe --- /dev/null +++ b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch @@ -0,0 +1,51 @@ +This cherry-picked patch fixes tests for Go >= 1.15. Restic v0.10 (which +includes this patch) requires go module support from the Go build system. +Original patch follows. + +--- +From 97950ab81a18de06b95384da6d8646fef87c9d97 Mon Sep 17 00:00:00 2001 +From: Alexander Neumann <alexander@bumpern.de> +Date: Sat, 12 Sep 2020 17:36:44 +0200 +Subject: [PATCH] options: Fix test for Go >= 1.15 + +--- + internal/options/options_test.go | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/internal/options/options_test.go b/internal/options/options_test.go +index de94fc90a1..8d268992a3 100644 +--- a/internal/options/options_test.go ++++ b/internal/options/options_test.go +@@ -3,6 +3,7 @@ package options + import ( + "fmt" + "reflect" ++ "regexp" + "testing" + "time" + ) +@@ -199,7 +200,7 @@ var invalidSetTests = []struct { + "timeout": "2134", + }, + "ns", +- `time: missing unit in duration 2134`, ++ `time: missing unit in duration "?2134"?`, + }, + } + +@@ -212,8 +213,13 @@ func TestOptionsApplyInvalid(t *testing.T) { + t.Fatalf("expected error %v not found", test.err) + } + +- if err.Error() != test.err { +- t.Fatalf("expected error %q, got %q", test.err, err.Error()) ++ matched, err := regexp.MatchString(test.err, err.Error()) ++ if err != nil { ++ t.Fatal(err) ++ } ++ ++ if !matched { ++ t.Fatalf("expected error to match %q, got %q", test.err, err.Error()) + } + }) + } diff --git a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch new file mode 100644 index 0000000000..c91d273f92 --- /dev/null +++ b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch @@ -0,0 +1,52 @@ +https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25 + +From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001 +From: Craig Andrews <candrews@integralblue.com> +Date: Sun, 1 Mar 2020 19:24:22 -0500 +Subject: [PATCH] Link additional required LLVM libraries + +Without these additional required dependencies, linking fails with errors such as: +`undefined reference to llvm::errs()'` +--- + CMakeLists.txt | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1794a07..c7b852a 100644 +--- a/lib/comgr/CMakeLists.txt ++++ b/lib/comgr/CMakeLists.txt +@@ -207,7 +207,11 @@ install(FILES + DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}") + + set(CLANG_LIBS +- clangFrontendTool) ++ clangFrontendTool ++ clangFrontend ++ clangBasic ++ clangDriver ++ clangSerialization) + + set(LLD_LIBS + lldELF +@@ -218,8 +222,20 @@ if (LLVM_LINK_LLVM_DYLIB) + else() + llvm_map_components_to_libnames(LLVM_LIBS + ${LLVM_TARGETS_TO_BUILD} ++ Option + DebugInfoDWARF +- Symbolize) ++ Symbolize ++ Support ++ Object ++ BitWriter ++ MC ++ MCParser ++ MCDisassembler ++ Core ++ IRReader ++ CodeGen ++ Linker ++ BinaryFormat) + endif() + + target_link_libraries(amd_comgr diff --git a/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch b/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch new file mode 100644 index 0000000000..d81bb0747f --- /dev/null +++ b/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch @@ -0,0 +1,14 @@ +Add missing include dirs for ROCclr. + +--- a/amdocl/CMakeLists.txt 2020-12-05 22:05:55.838529158 +0100 ++++ b/amdocl/CMakeLists.txt 2020-12-05 22:07:35.677524507 +0100 +@@ -23,6 +23,9 @@ + include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos) + include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers) + include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers/opencl2.2) ++include_directories(${ROCclr_DIR}/../../../include) ++include_directories(${ROCclr_DIR}/../../../include/compiler/lib/include/) ++include_directories(${ROCclr_DIR}/../../../include/elf/) + + if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR + (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang")) diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch new file mode 100644 index 0000000000..5709e0d19a --- /dev/null +++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch @@ -0,0 +1,28 @@ +Do not build and install clinfo. + +diff --git a/CMakeLists.txt.orig b/CMakeLists.txt +index 76847d3..3f62bfe 100644 +--- a/CMakeLists.txt.orig ++++ b/CMakeLists.txt +@@ -72,7 +72,7 @@ find_package(ROCclr REQUIRED CONFIG + + add_subdirectory(khronos/icd) + add_subdirectory(amdocl) +-add_subdirectory(tools/clinfo) ++#add_subdirectory(tools/clinfo) + add_subdirectory(tools/cltrace) + if(BUILD_TESTS) + add_subdirectory(tests/ocltst) +@@ -108,9 +108,9 @@ endif() + ###--- Packaging ------------------------------------------------------------### + + # MAIN package +-install(PROGRAMS $<TARGET_FILE:clinfo> +- DESTINATION bin +- COMPONENT MAIN) ++#install(PROGRAMS $<TARGET_FILE:clinfo> ++# DESTINATION bin ++# COMPONENT MAIN) + install(PROGRAMS $<TARGET_FILE:cltrace> + DESTINATION lib + COMPONENT MAIN) diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch new file mode 100644 index 0000000000..e0328d7734 --- /dev/null +++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch @@ -0,0 +1,25 @@ +Do not build and install cltrace. + +diff --git a/CMakeLists.txt.orig b/CMakeLists.txt +index c449db4..9cff673 100644 +--- a/CMakeLists.txt.orig ++++ b/CMakeLists.txt +@@ -73,7 +73,7 @@ find_package(ROCclr REQUIRED CONFIG + #add_subdirectory(khronos/icd) + add_subdirectory(amdocl) + #add_subdirectory(tools/clinfo) +-add_subdirectory(tools/cltrace) ++#add_subdirectory(tools/cltrace) + if(BUILD_TESTS) + add_subdirectory(tests/ocltst) + endif() +@@ -108,9 +108,6 @@ endif() + #install(PROGRAMS $<TARGET_FILE:clinfo> + # DESTINATION bin + # COMPONENT MAIN) +-install(PROGRAMS $<TARGET_FILE:cltrace> +- DESTINATION lib +- COMPONENT MAIN) + install(PROGRAMS $<TARGET_FILE:amdocl64> + DESTINATION lib + COMPONENT MAIN) diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch new file mode 100644 index 0000000000..ed20f02503 --- /dev/null +++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch @@ -0,0 +1,63 @@ +Do not build and install libOpenCL. + +--- b/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,7 +70,7 @@ + ${ROCclr_DIR} + ${LIBROCclr_STATIC_DIR}) + +-add_subdirectory(khronos/icd) ++#add_subdirectory(khronos/icd) + add_subdirectory(amdocl) + #add_subdirectory(tools/clinfo) + add_subdirectory(tools/cltrace) +@@ -93,9 +93,6 @@ + OUTPUT_VARIABLE OPENCL_VERSION_GITDATE + OUTPUT_STRIP_TRAILING_WHITESPACE) + +-get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION) +-get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION) +- + find_package(ROCM QUIET CONFIG PATHS /opt/rocm) + + if(ROCM_FOUND) +@@ -117,25 +114,6 @@ + install(PROGRAMS $<TARGET_FILE:amdocl64> + DESTINATION lib + COMPONENT MAIN) +-install(PROGRAMS $<TARGET_FILE:OpenCL> +- DESTINATION lib +- COMPONENT MAIN) +-install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL> +- DESTINATION lib +- COMPONENT MAIN) +- +-# DEV package +-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2/CL" +- DESTINATION include +- COMPONENT DEV +- USE_SOURCE_PERMISSIONS +- PATTERN cl_d3d10.h EXCLUDE +- PATTERN cl_d3d11.h EXCLUDE +- PATTERN cl_dx9_media_sharing.h EXCLUDE +- PATTERN cl_egl.h EXCLUDE) +-install(PROGRAMS $<TARGET_LINKER_FILE:OpenCL> +- DESTINATION lib +- COMPONENT DEV) + + ############################# + # Packaging steps +--- a/khronos/icd/CMakeLists.txt 2020-06-07 16:05:32.425022904 +0200 ++++ b/khronos/icd/CMakeLists.txt 2020-06-07 16:06:03.273022786 +0200 +@@ -132,7 +132,7 @@ + add_subdirectory (test) + endif() + +-install (TARGETS OpenCL +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++#install (TARGETS OpenCL ++# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/gnu/packages/patches/samba-fix-fcntl-hint-detection.patch b/gnu/packages/patches/samba-fix-fcntl-hint-detection.patch deleted file mode 100644 index b56c628537..0000000000 --- a/gnu/packages/patches/samba-fix-fcntl-hint-detection.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 454ccd986b61799908a6898a55d0480911f15306 Mon Sep 17 00:00:00 2001 -From: Ralph Boehme <slow@samba.org> -Date: Mon, 21 Sep 2020 07:48:43 +0200 -Subject: [PATCH] s3: fix fcntl waf configure check - -RN: Fix fcntl waf configure check -BUG: https://bugzilla.samba.org/show_bug.cgi?id=14503 - -Signed-off-by: Ralph Boehme <slow@samba.org> -Reviewed-by: Volker Lendecke <vl@samba.org> - -Autobuild-User(master): Volker Lendecke <vl@samba.org> -Autobuild-Date(master): Mon Sep 21 07:26:54 UTC 2020 on sn-devel-184 ---- - source3/wscript | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/source3/wscript b/source3/wscript -index 840ed430c0f..d3ef346eecd 100644 ---- a/source3/wscript -+++ b/source3/wscript -@@ -1244,7 +1244,7 @@ err: - - int main(void) - { -- uint64_t *hint, get_hint; -+ uint64_t hint, get_hint; - int fd; - - fd = open(DATA, O_RDONLY | O_CREAT | O_EXCL); -@@ -1252,8 +1252,8 @@ int main(void) - goto err; - } - -- *hint = RWH_WRITE_LIFE_SHORT; -- int ret = fcntl(fd, F_SET_RW_HINT, hint); -+ hint = RWH_WRITE_LIFE_SHORT; -+ int ret = fcntl(fd, F_SET_RW_HINT, &hint); - if (ret == -1) { - goto err; - } -@@ -1267,8 +1267,8 @@ int main(void) - goto err; - } - -- *hint = RWH_WRITE_LIFE_EXTREME; -- ret = fcntl(fd, F_SET_FILE_RW_HINT, hint); -+ hint = RWH_WRITE_LIFE_EXTREME; -+ ret = fcntl(fd, F_SET_FILE_RW_HINT, &hint); - if (ret == -1) { - goto err; - } --- -2.28.0 - diff --git a/gnu/packages/patches/u-boot-nintendo-nes-serial.patch b/gnu/packages/patches/u-boot-nintendo-nes-serial.patch new file mode 100644 index 0000000000..3588236803 --- /dev/null +++ b/gnu/packages/patches/u-boot-nintendo-nes-serial.patch @@ -0,0 +1,14 @@ +Date: Sun, 5 Sep 2021 23:24:00 +0200 +Author: Danny Milosavljevic <dannym@scratchpost.org> +Description: Set console UART to use pins PB0 and PB1. +--- u-boot-2018.11/configs/Nintendo_NES_Classic_Edition_defconfig.orig 2021-09-05 23:09:15.905846467 +0200 ++++ u-boot-2018.11/configs/Nintendo_NES_Classic_Edition_defconfig 2021-09-05 23:12:21.562774694 +0200 +@@ -21,7 +21,7 @@ + CONFIG_SYS_NAND_OOBSIZE=0x40 + CONFIG_AXP_DLDO1_VOLT=3300 + CONFIG_AXP_ELDO2_VOLT=1800 +-CONFIG_CONS_INDEX=5 ++CONFIG_CONS_INDEX=1 + CONFIG_USB_MUSB_GADGET=y + CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y + CONFIG_USB_FUNCTION_MASS_STORAGE=y diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch index d6c1987718..468024ab00 100644 --- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch +++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch @@ -30,8 +30,8 @@ Index: u-boot/configs/qemu-riscv64_smode_defconfig +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" Index: u-boot/configs/sifive_fu540_defconfig =================================================================== ---- u-boot.orig/configs/sifive_fu540_defconfig -+++ u-boot/configs/sifive_fu540_defconfig +--- u-boot.orig/configs/sifive_unleashed_defconfig ++++ u-boot/configs/sifive_unleashed_defconfig @@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_CLK=y CONFIG_DM_MTD=y diff --git a/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch b/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch new file mode 100644 index 0000000000..a5b92e3e8f --- /dev/null +++ b/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch @@ -0,0 +1,16 @@ +Description: prevent relocating initrd & fdt, that results in failure to boot +Author: Heinrich Schuchardt (xypron) +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246 +Index: u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h +=================================================================== +--- u-boot-2021.07~rc4+dfsg.orig/include/configs/sifive-unmatched.h ++++ u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h +@@ -62,6 +62,8 @@ + "name=system,size=-,bootable,type=${type_guid_gpt_system};" + + #define CONFIG_EXTRA_ENV_SETTINGS \ ++ "fdt_high=0xffffffffffffffff\0" \ ++ "initrd_high=0xffffffffffffffff\0" \ + "kernel_addr_r=0x84000000\0" \ + "fdt_addr_r=0x88000000\0" \ + "scriptaddr=0x88100000\0" \ diff --git a/gnu/packages/patches/vigra-python-compat.patch b/gnu/packages/patches/vigra-python-compat.patch deleted file mode 100644 index 63c6abb326..0000000000 --- a/gnu/packages/patches/vigra-python-compat.patch +++ /dev/null @@ -1,18 +0,0 @@ -Fix build with Boost + Python 3.7. - -Taken from upstream: -https://github.com/ukoethe/vigra/commit/a6fa62663c6a6b752ed0707e95f643e25867a0f9 - -diff --git a/vigranumpy/src/core/vigranumpycore.cxx b/vigranumpy/src/core/vigranumpycore.cxx -index ec38d3636..c81c6ae52 100644 ---- a/vigranumpy/src/core/vigranumpycore.cxx -+++ b/vigranumpy/src/core/vigranumpycore.cxx -@@ -61,7 +61,7 @@ UInt32 pychecksum(python::str const & s) - return checksum(data, size); - #else - Py_ssize_t size = 0; -- char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size); -+ const char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size); - return checksum(data, size); - #endif - } diff --git a/gnu/packages/patches/xnnpack-system-libraries.patch b/gnu/packages/patches/xnnpack-system-libraries.patch new file mode 100644 index 0000000000..ed4a5d93d3 --- /dev/null +++ b/gnu/packages/patches/xnnpack-system-libraries.patch @@ -0,0 +1,1499 @@ +This patch allows the build process to use the provided dependencies instead +of adding their source as CMake sub-directories (in which case "make install" +would install googletest's and googlebenchmark's libraries and headers). + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 177b98d5..937385c3 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4972,9 +4972,6 @@ IF(NOT TARGET pthreadpool) + ENDIF() + ENDIF() + TARGET_LINK_LIBRARIES(XNNPACK PUBLIC pthreadpool) +-TARGET_LINK_LIBRARIES(all_microkernels PRIVATE pthreadpool) +-TARGET_LINK_LIBRARIES(packing PRIVATE pthreadpool) +-TARGET_LINK_LIBRARIES(indirection PRIVATE pthreadpool) + + # ---[ Configure FXdiv + IF(NOT TARGET fxdiv) +@@ -4993,9 +4990,6 @@ IF(NOT TARGET fxdiv) + SET_PROPERTY(TARGET fxdiv PROPERTY LINKER_LANGUAGE C) + ENDIF() + ENDIF() +-TARGET_LINK_LIBRARIES(XNNPACK PRIVATE fxdiv) +-TARGET_LINK_LIBRARIES(all_microkernels PRIVATE fxdiv) +-TARGET_LINK_LIBRARIES(indirection PRIVATE fxdiv) + + # ---[ Configure FP16 + IF(NOT TARGET fp16) +@@ -5014,8 +5008,6 @@ IF(NOT TARGET fp16) + SET_PROPERTY(TARGET fp16 PROPERTY LINKER_LANGUAGE C) + ENDIF() + ENDIF() +-TARGET_LINK_LIBRARIES(XNNPACK PRIVATE fp16) +-TARGET_LINK_LIBRARIES(all_microkernels PRIVATE fp16) + + INSTALL(TARGETS XNNPACK + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -5062,7 +5054,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(add-nd-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(add-nd-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(add-nd-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(add-nd-test add-nd-test) + + ADD_EXECUTABLE(argmax-pooling-nhwc-test test/argmax-pooling-nhwc.cc) +@@ -5134,7 +5126,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(convolution-nhwc-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(convolution-nhwc-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(convolution-nhwc-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(convolution-nhwc-test convolution-nhwc-test) + + ADD_EXECUTABLE(convolution-nchw-test test/convolution-nchw.cc) +@@ -5143,7 +5135,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(convolution-nchw-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(convolution-nchw-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(convolution-nchw-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(convolution-nchw-test convolution-nchw-test) + + ADD_EXECUTABLE(copy-nc-test test/copy-nc.cc) +@@ -5188,7 +5180,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(divide-nd-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(divide-nd-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(divide-nd-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(divide-nd-test divide-nd-test) + + ADD_EXECUTABLE(elu-nc-test test/elu-nc.cc) +@@ -5224,7 +5216,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(global-average-pooling-nwc-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(global-average-pooling-nwc-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(global-average-pooling-nwc-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(global-average-pooling-nwc-test global-average-pooling-nwc-test) + + ADD_EXECUTABLE(global-average-pooling-ncw-test test/global-average-pooling-ncw.cc) +@@ -5233,7 +5225,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(global-average-pooling-ncw-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(global-average-pooling-ncw-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(global-average-pooling-ncw-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(global-average-pooling-ncw-test global-average-pooling-ncw-test) + + ADD_EXECUTABLE(hardswish-nc-test test/hardswish-nc.cc) +@@ -5242,7 +5234,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(hardswish-nc-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(hardswish-nc-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(hardswish-nc-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(hardswish-nc-test hardswish-nc-test) + + ADD_EXECUTABLE(leaky-relu-nc-test test/leaky-relu-nc.cc) +@@ -5269,7 +5261,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(maximum-nd-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(maximum-nd-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(maximum-nd-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(maximum-nd-test maximum-nd-test) + + ADD_EXECUTABLE(minimum-nd-test test/minimum-nd.cc) +@@ -5278,7 +5270,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(minimum-nd-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(minimum-nd-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(minimum-nd-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(minimum-nd-test minimum-nd-test) + + ADD_EXECUTABLE(multiply-nd-test test/multiply-nd.cc) +@@ -5287,7 +5279,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(multiply-nd-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(multiply-nd-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(multiply-nd-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(multiply-nd-test multiply-nd-test) + + ADD_EXECUTABLE(negate-nc-test test/negate-nc.cc) +@@ -5368,7 +5360,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(squared-difference-nd-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(squared-difference-nd-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(squared-difference-nd-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(squared-difference-nd-test squared-difference-nd-test) + + ADD_EXECUTABLE(subtract-nd-test test/subtract-nd.cc) +@@ -5377,7 +5369,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(subtract-nd-test PRIVATE src test) +- TARGET_LINK_LIBRARIES(subtract-nd-test PRIVATE XNNPACK fp16 gtest gtest_main) ++ TARGET_LINK_LIBRARIES(subtract-nd-test PRIVATE XNNPACK gtest gtest_main) + ADD_TEST(subtract-nd-test subtract-nd-test) + + ADD_EXECUTABLE(truncation-nc-test test/truncation-nc.cc) +@@ -5423,7 +5415,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-dwconv-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-dwconv-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-dwconv-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-dwconv-minmax-test f16-dwconv-minmax-test) + + ADD_EXECUTABLE(f16-gavgpool-minmax-test test/f16-gavgpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5432,7 +5424,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-gavgpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-gavgpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-gavgpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-gavgpool-minmax-test f16-gavgpool-minmax-test) + + ADD_EXECUTABLE(f16-gemm-minmax-test test/f16-gemm-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5441,7 +5433,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-gemm-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-gemm-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-gemm-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-gemm-minmax-test f16-gemm-minmax-test) + + ADD_EXECUTABLE(f16-igemm-minmax-test test/f16-igemm-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5450,7 +5442,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-igemm-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-igemm-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-igemm-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-igemm-minmax-test f16-igemm-minmax-test) + + ADD_EXECUTABLE(f16-spmm-minmax-test test/f16-spmm-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5459,7 +5451,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-spmm-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-spmm-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-spmm-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-spmm-minmax-test f16-spmm-minmax-test) + + ADD_EXECUTABLE(f16-vadd-minmax-test test/f16-vadd-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5468,7 +5460,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vadd-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vadd-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vadd-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vadd-minmax-test f16-vadd-minmax-test) + + ADD_EXECUTABLE(f16-vaddc-minmax-test test/f16-vaddc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5477,7 +5469,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vaddc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vaddc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vaddc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vaddc-minmax-test f16-vaddc-minmax-test) + + ADD_EXECUTABLE(f16-vclamp-test test/f16-vclamp.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5486,7 +5478,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vclamp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vclamp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vclamp-test PRIVATE cpuinfo gtest_main) + ADD_TEST(f16-vclamp-test f16-vclamp-test) + + ADD_EXECUTABLE(f16-vdiv-minmax-test test/f16-vdiv-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5504,7 +5496,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vdivc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vdivc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vdivc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vdivc-minmax-test f16-vdivc-minmax-test) + + ADD_EXECUTABLE(f16-vrdivc-minmax-test test/f16-vrdivc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5513,7 +5505,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vrdivc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vrdivc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vrdivc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vrdivc-minmax-test f16-vrdivc-minmax-test) + + ADD_EXECUTABLE(f16-vhswish-test test/f16-vhswish.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5522,7 +5514,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vhswish-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vhswish-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vhswish-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vhswish-test f16-vhswish-test) + + ADD_EXECUTABLE(f16-vmax-test test/f16-vmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5531,7 +5523,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vmax-test f16-vmax-test) + + ADD_EXECUTABLE(f16-vmaxc-test test/f16-vmaxc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5540,7 +5532,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vmaxc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vmaxc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vmaxc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vmaxc-test f16-vmaxc-test) + + ADD_EXECUTABLE(f16-vmin-test test/f16-vmin.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5549,7 +5541,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vmin-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vmin-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vmin-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vmin-test f16-vmin-test) + + ADD_EXECUTABLE(f16-vminc-test test/f16-vminc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5558,7 +5550,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vminc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vminc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vminc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vminc-test f16-vminc-test) + + ADD_EXECUTABLE(f16-vmul-minmax-test test/f16-vmul-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5567,7 +5559,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vmul-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vmul-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vmul-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vmul-minmax-test f16-vmul-minmax-test) + + ADD_EXECUTABLE(f16-vmulc-minmax-test test/f16-vmulc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5576,7 +5568,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vmulc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vmulc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vmulc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vmulc-minmax-test f16-vmulc-minmax-test) + + ADD_EXECUTABLE(f16-vmulcaddc-minmax-test test/f16-vmulcaddc-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5585,7 +5577,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vmulcaddc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vmulcaddc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vmulcaddc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vmulcaddc-minmax-test f16-vmulcaddc-minmax-test) + + ADD_EXECUTABLE(f16-prelu-test test/f16-prelu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5594,7 +5586,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-prelu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-prelu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-prelu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-prelu-test f16-prelu-test) + + ADD_EXECUTABLE(f16-vsub-minmax-test test/f16-vsub-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5603,7 +5595,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vsub-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vsub-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vsub-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vsub-minmax-test f16-vsub-minmax-test) + + ADD_EXECUTABLE(f16-vsubc-minmax-test test/f16-vsubc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5612,7 +5604,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vsubc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vsubc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vsubc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vsubc-minmax-test f16-vsubc-minmax-test) + + ADD_EXECUTABLE(f16-vrsubc-minmax-test test/f16-vrsubc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5621,7 +5613,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f16-vrsubc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f16-vrsubc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f16-vrsubc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f16-vrsubc-minmax-test f16-vrsubc-minmax-test) + + ADD_EXECUTABLE(f32-argmaxpool-test test/f32-argmaxpool.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5630,7 +5622,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-argmaxpool-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-argmaxpool-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-argmaxpool-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-argmaxpool-test f32-argmaxpool-test) + + ADD_EXECUTABLE(f32-avgpool-minmax-test test/f32-avgpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5639,7 +5631,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-avgpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-avgpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-avgpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-avgpool-minmax-test f32-avgpool-minmax-test) + + ADD_EXECUTABLE(f32-conv-hwc-test test/f32-conv-hwc.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5648,7 +5640,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-conv-hwc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-conv-hwc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-conv-hwc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-conv-hwc-test f32-conv-hwc-test) + + ADD_EXECUTABLE(f32-conv-hwc2chw-test test/f32-conv-hwc2chw.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5657,7 +5649,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-conv-hwc2chw-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-conv-hwc2chw-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-conv-hwc2chw-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-conv-hwc2chw-test f32-conv-hwc2chw-test) + + ADD_EXECUTABLE(f32-dwconv-test test/f32-dwconv.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5666,7 +5658,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-dwconv-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-dwconv-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-dwconv-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-dwconv-test f32-dwconv-test) + + ADD_EXECUTABLE(f32-dwconv2d-chw-test test/f32-dwconv2d-chw.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5675,7 +5667,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-dwconv2d-chw-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-dwconv2d-chw-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-dwconv2d-chw-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-dwconv2d-chw-test f32-dwconv2d-chw-test) + + ADD_EXECUTABLE(f32-dwconv-minmax-test test/f32-dwconv-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5684,7 +5676,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-dwconv-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-dwconv-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-dwconv-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-dwconv-minmax-test f32-dwconv-minmax-test) + + ADD_EXECUTABLE(f32-gavgpool-cw-test test/f32-gavgpool-cw.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5693,7 +5685,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-gavgpool-cw-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-gavgpool-cw-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-gavgpool-cw-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-gavgpool-cw-test f32-gavgpool-cw-test) + + ADD_EXECUTABLE(f32-gavgpool-minmax-test test/f32-gavgpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5702,7 +5694,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-gavgpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-gavgpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-gavgpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-gavgpool-minmax-test f32-gavgpool-minmax-test) + + ADD_EXECUTABLE(f32-gemm-test test/f32-gemm.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5711,7 +5703,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-gemm-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-gemm-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-gemm-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-gemm-test f32-gemm-test) + + ADD_EXECUTABLE(f32-gemm-relu-test test/f32-gemm-relu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5720,7 +5712,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-gemm-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-gemm-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-gemm-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-gemm-relu-test f32-gemm-relu-test) + + ADD_EXECUTABLE(f32-gemm-minmax-test test/f32-gemm-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5729,7 +5721,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-gemm-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-gemm-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-gemm-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-gemm-minmax-test f32-gemm-minmax-test) + + ADD_EXECUTABLE(f32-gemminc-minmax-test test/f32-gemminc-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5738,7 +5730,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-gemminc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-gemminc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-gemminc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-gemminc-minmax-test f32-gemminc-minmax-test) + + ADD_EXECUTABLE(f32-ibilinear-test test/f32-ibilinear.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5747,7 +5739,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-ibilinear-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-ibilinear-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-ibilinear-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-ibilinear-test f32-ibilinear-test) + + ADD_EXECUTABLE(f32-ibilinear-chw-test test/f32-ibilinear-chw.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5756,7 +5748,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-ibilinear-chw-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-ibilinear-chw-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-ibilinear-chw-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-ibilinear-chw-test f32-ibilinear-chw-test) + + ADD_EXECUTABLE(f32-igemm-test test/f32-igemm.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5765,7 +5757,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-igemm-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-igemm-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-igemm-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-igemm-test f32-igemm-test) + + ADD_EXECUTABLE(f32-igemm-relu-test test/f32-igemm-relu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5774,7 +5766,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-igemm-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-igemm-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-igemm-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-igemm-relu-test f32-igemm-relu-test) + + ADD_EXECUTABLE(f32-igemm-minmax-test test/f32-igemm-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5787,7 +5779,7 @@ IF(XNNPACK_BUILD_TESTS) + # Work-around for "too many sections" error + TARGET_COMPILE_OPTIONS(f32-igemm-minmax-test PRIVATE "$<$<NOT:$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>>:-Wa,-mbig-obj>") + ENDIF() +- TARGET_LINK_LIBRARIES(f32-igemm-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-igemm-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-igemm-minmax-test f32-igemm-minmax-test) + + ADD_EXECUTABLE(f32-maxpool-minmax-test test/f32-maxpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5796,7 +5788,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-maxpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-maxpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-maxpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-maxpool-minmax-test f32-maxpool-minmax-test) + + ADD_EXECUTABLE(f32-pavgpool-minmax-test test/f32-pavgpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5805,7 +5797,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-pavgpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-pavgpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-pavgpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-pavgpool-minmax-test f32-pavgpool-minmax-test) + + ADD_EXECUTABLE(f32-ppmm-minmax-test test/f32-ppmm-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -5814,7 +5806,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-ppmm-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-ppmm-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-ppmm-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-ppmm-minmax-test f32-ppmm-minmax-test) + + ADD_EXECUTABLE(f32-prelu-test test/f32-prelu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5823,7 +5815,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-prelu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-prelu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-prelu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-prelu-test f32-prelu-test) + + ADD_EXECUTABLE(f32-raddexpminusmax-test test/f32-raddexpminusmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5832,7 +5824,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-raddexpminusmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-raddexpminusmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-raddexpminusmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-raddexpminusmax-test f32-raddexpminusmax-test) + + ADD_EXECUTABLE(f32-raddextexp-test test/f32-raddextexp.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5841,7 +5833,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-raddextexp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-raddextexp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-raddextexp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-raddextexp-test f32-raddextexp-test) + + ADD_EXECUTABLE(f32-raddstoreexpminusmax-test test/f32-raddstoreexpminusmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5850,7 +5842,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-raddstoreexpminusmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-raddstoreexpminusmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-raddstoreexpminusmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-raddstoreexpminusmax-test f32-raddstoreexpminusmax-test) + + ADD_EXECUTABLE(f32-rmax-test test/f32-rmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5859,7 +5851,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-rmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-rmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-rmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-rmax-test f32-rmax-test) + + ADD_EXECUTABLE(f32-spmm-minmax-test test/f32-spmm-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5868,7 +5860,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-spmm-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-spmm-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-spmm-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-spmm-minmax-test f32-spmm-minmax-test) + + ADD_EXECUTABLE(f32-vabs-test test/f32-vabs.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5877,7 +5869,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vabs-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vabs-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vabs-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vabs-test f32-vabs-test) + + ADD_EXECUTABLE(f32-vadd-test test/f32-vadd.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5886,7 +5878,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vadd-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vadd-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vadd-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vadd-test f32-vadd-test) + + ADD_EXECUTABLE(f32-vadd-minmax-test test/f32-vadd-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5895,7 +5887,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vadd-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vadd-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vadd-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vadd-minmax-test f32-vadd-minmax-test) + + ADD_EXECUTABLE(f32-vadd-relu-test test/f32-vadd-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5904,7 +5896,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vadd-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vadd-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vadd-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vadd-relu-test f32-vadd-relu-test) + + ADD_EXECUTABLE(f32-vaddc-test test/f32-vaddc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5913,7 +5905,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vaddc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vaddc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vaddc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vaddc-test f32-vaddc-test) + + ADD_EXECUTABLE(f32-vaddc-minmax-test test/f32-vaddc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5922,7 +5914,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vaddc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vaddc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vaddc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vaddc-minmax-test f32-vaddc-minmax-test) + + ADD_EXECUTABLE(f32-vaddc-relu-test test/f32-vaddc-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5931,7 +5923,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vaddc-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vaddc-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vaddc-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vaddc-relu-test f32-vaddc-relu-test) + + ADD_EXECUTABLE(f32-vclamp-test test/f32-vclamp.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5940,7 +5932,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vclamp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vclamp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vclamp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vclamp-test f32-vclamp-test) + + ADD_EXECUTABLE(f32-vhswish-test test/f32-vhswish.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5949,7 +5941,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vhswish-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vhswish-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vhswish-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vhswish-test f32-vhswish-test) + + ADD_EXECUTABLE(f32-vdiv-test test/f32-vdiv.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5958,7 +5950,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vdiv-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vdiv-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vdiv-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vdiv-test f32-vdiv-test) + + ADD_EXECUTABLE(f32-vdiv-minmax-test test/f32-vdiv-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5967,7 +5959,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vdiv-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vdiv-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vdiv-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vdiv-minmax-test f32-vdiv-minmax-test) + + ADD_EXECUTABLE(f32-vdiv-relu-test test/f32-vdiv-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5976,7 +5968,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vdiv-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vdiv-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vdiv-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vdiv-relu-test f32-vdiv-relu-test) + + ADD_EXECUTABLE(f32-vdivc-test test/f32-vdivc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5985,7 +5977,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vdivc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vdivc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vdivc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vdivc-test f32-vdivc-test) + + ADD_EXECUTABLE(f32-vdivc-minmax-test test/f32-vdivc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -5994,7 +5986,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vdivc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vdivc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vdivc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vdivc-minmax-test f32-vdivc-minmax-test) + + ADD_EXECUTABLE(f32-vdivc-relu-test test/f32-vdivc-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6003,7 +5995,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vdivc-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vdivc-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vdivc-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vdivc-relu-test f32-vdivc-relu-test) + + ADD_EXECUTABLE(f32-vrdivc-test test/f32-vrdivc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6012,7 +6004,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrdivc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrdivc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrdivc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrdivc-test f32-vrdivc-test) + + ADD_EXECUTABLE(f32-vrdivc-minmax-test test/f32-vrdivc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6021,7 +6013,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrdivc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrdivc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrdivc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrdivc-minmax-test f32-vrdivc-minmax-test) + + ADD_EXECUTABLE(f32-vrdivc-relu-test test/f32-vrdivc-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6030,7 +6022,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrdivc-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrdivc-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrdivc-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrdivc-relu-test f32-vrdivc-relu-test) + + ADD_EXECUTABLE(f32-velu-test test/f32-velu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6039,7 +6031,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-velu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-velu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-velu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-velu-test f32-velu-test) + + ADD_EXECUTABLE(f32-vlrelu-test test/f32-vlrelu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6048,7 +6040,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vlrelu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vlrelu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vlrelu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vlrelu-test f32-vlrelu-test) + + ADD_EXECUTABLE(f32-vmax-test test/f32-vmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6057,7 +6049,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmax-test f32-vmax-test) + + ADD_EXECUTABLE(f32-vmaxc-test test/f32-vmaxc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6066,7 +6058,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmaxc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmaxc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmaxc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmaxc-test f32-vmaxc-test) + + ADD_EXECUTABLE(f32-vmin-test test/f32-vmin.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6075,7 +6067,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmin-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmin-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmin-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmin-test f32-vmin-test) + + ADD_EXECUTABLE(f32-vminc-test test/f32-vminc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6084,7 +6076,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vminc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vminc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vminc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vminc-test f32-vminc-test) + + ADD_EXECUTABLE(f32-vmul-test test/f32-vmul.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6093,7 +6085,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmul-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmul-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmul-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmul-test f32-vmul-test) + + ADD_EXECUTABLE(f32-vmul-minmax-test test/f32-vmul-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6102,7 +6094,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmul-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmul-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmul-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmul-minmax-test f32-vmul-minmax-test) + + ADD_EXECUTABLE(f32-vmul-relu-test test/f32-vmul-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6111,7 +6103,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmul-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmul-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmul-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmul-relu-test f32-vmul-relu-test) + + ADD_EXECUTABLE(f32-vmulc-test test/f32-vmulc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6120,7 +6112,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmulc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmulc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmulc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmulc-test f32-vmulc-test) + + ADD_EXECUTABLE(f32-vmulc-minmax-test test/f32-vmulc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6129,7 +6121,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmulc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmulc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmulc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmulc-minmax-test f32-vmulc-minmax-test) + + ADD_EXECUTABLE(f32-vmulc-relu-test test/f32-vmulc-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6138,7 +6130,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmulc-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmulc-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmulc-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmulc-relu-test f32-vmulc-relu-test) + + ADD_EXECUTABLE(f32-vmulcaddc-minmax-test test/f32-vmulcaddc-minmax.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6147,7 +6139,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vmulcaddc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vmulcaddc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vmulcaddc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vmulcaddc-minmax-test f32-vmulcaddc-minmax-test) + + ADD_EXECUTABLE(f32-vneg-test test/f32-vneg.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6156,7 +6148,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vneg-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vneg-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vneg-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vneg-test f32-vneg-test) + + ADD_EXECUTABLE(f32-vrelu-test test/f32-vrelu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6165,7 +6157,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrelu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrelu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrelu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrelu-test f32-vrelu-test) + + ADD_EXECUTABLE(f32-vrndne-test test/f32-vrndne.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6174,7 +6166,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrndne-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrndne-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrndne-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrndne-test f32-vrndne-test) + + ADD_EXECUTABLE(f32-vrndz-test test/f32-vrndz.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6183,7 +6175,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrndz-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrndz-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrndz-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrndz-test f32-vrndz-test) + + ADD_EXECUTABLE(f32-vrndu-test test/f32-vrndu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6192,7 +6184,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrndu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrndu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrndu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrndu-test f32-vrndu-test) + + ADD_EXECUTABLE(f32-vrndd-test test/f32-vrndd.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6201,7 +6193,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrndd-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrndd-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrndd-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrndd-test f32-vrndd-test) + + ADD_EXECUTABLE(f32-vscaleexpminusmax-test test/f32-vscaleexpminusmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6210,7 +6202,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vscaleexpminusmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vscaleexpminusmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vscaleexpminusmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vscaleexpminusmax-test f32-vscaleexpminusmax-test) + + ADD_EXECUTABLE(f32-vscaleextexp-test test/f32-vscaleextexp.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6219,7 +6211,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vscaleextexp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vscaleextexp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vscaleextexp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vscaleextexp-test f32-vscaleextexp-test) + + ADD_EXECUTABLE(f32-vsigmoid-test test/f32-vsigmoid.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6228,7 +6220,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsigmoid-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsigmoid-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsigmoid-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsigmoid-test f32-vsigmoid-test) + + ADD_EXECUTABLE(f32-vsqr-test test/f32-vsqr.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6237,7 +6229,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsqr-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsqr-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsqr-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsqr-test f32-vsqr-test) + + ADD_EXECUTABLE(f32-vsqrdiff-test test/f32-vsqrdiff.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6246,7 +6238,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsqrdiff-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsqrdiff-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsqrdiff-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsqrdiff-test f32-vsqrdiff-test) + + ADD_EXECUTABLE(f32-vsqrdiffc-test test/f32-vsqrdiffc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6255,7 +6247,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsqrdiffc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsqrdiffc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsqrdiffc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsqrdiffc-test f32-vsqrdiffc-test) + + ADD_EXECUTABLE(f32-vsqrt-test test/f32-vsqrt.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6264,7 +6256,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsqrt-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsqrt-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsqrt-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsqrt-test f32-vsqrt-test) + + ADD_EXECUTABLE(f32-vsub-test test/f32-vsub.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6273,7 +6265,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsub-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsub-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsub-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsub-test f32-vsub-test) + + ADD_EXECUTABLE(f32-vsub-minmax-test test/f32-vsub-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6282,7 +6274,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsub-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsub-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsub-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsub-minmax-test f32-vsub-minmax-test) + + ADD_EXECUTABLE(f32-vsub-relu-test test/f32-vsub-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6291,7 +6283,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsub-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsub-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsub-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsub-relu-test f32-vsub-relu-test) + + ADD_EXECUTABLE(f32-vsubc-test test/f32-vsubc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6300,7 +6292,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsubc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsubc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsubc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsubc-test f32-vsubc-test) + + ADD_EXECUTABLE(f32-vsubc-minmax-test test/f32-vsubc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6309,7 +6301,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsubc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsubc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsubc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsubc-minmax-test f32-vsubc-minmax-test) + + ADD_EXECUTABLE(f32-vsubc-relu-test test/f32-vsubc-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6318,7 +6310,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vsubc-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vsubc-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vsubc-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vsubc-relu-test f32-vsubc-relu-test) + + ADD_EXECUTABLE(f32-vrsubc-test test/f32-vrsubc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6327,7 +6319,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrsubc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrsubc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrsubc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrsubc-test f32-vrsubc-test) + + ADD_EXECUTABLE(f32-vrsubc-minmax-test test/f32-vrsubc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6336,7 +6328,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrsubc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrsubc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrsubc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrsubc-minmax-test f32-vrsubc-minmax-test) + + ADD_EXECUTABLE(f32-vrsubc-relu-test test/f32-vrsubc-relu.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6345,7 +6337,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(f32-vrsubc-relu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(f32-vrsubc-relu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-vrsubc-relu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(f32-vrsubc-relu-test f32-vrsubc-relu-test) + + ADD_EXECUTABLE(qc8-dwconv-minmax-fp32-test test/qc8-dwconv-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6354,7 +6346,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qc8-dwconv-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qc8-dwconv-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qc8-dwconv-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qc8-dwconv-minmax-fp32-test qc8-dwconv-minmax-fp32-test) + + ADD_EXECUTABLE(qc8-gemm-minmax-fp32-test test/qc8-gemm-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6363,7 +6355,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qc8-gemm-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qc8-gemm-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qc8-gemm-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qc8-gemm-minmax-fp32-test qc8-gemm-minmax-fp32-test) + + ADD_EXECUTABLE(qc8-igemm-minmax-fp32-test test/qc8-igemm-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6372,7 +6364,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qc8-igemm-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qc8-igemm-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qc8-igemm-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qc8-igemm-minmax-fp32-test qc8-igemm-minmax-fp32-test) + + ADD_EXECUTABLE(qs8-dwconv-minmax-fp32-test test/qs8-dwconv-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6381,7 +6373,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-dwconv-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-dwconv-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-dwconv-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-dwconv-minmax-fp32-test qs8-dwconv-minmax-fp32-test) + + ADD_EXECUTABLE(qs8-dwconv-minmax-gemmlowp-test test/qs8-dwconv-minmax-gemmlowp.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6390,7 +6382,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-dwconv-minmax-gemmlowp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-dwconv-minmax-gemmlowp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-dwconv-minmax-gemmlowp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-dwconv-minmax-gemmlowp-test qs8-dwconv-minmax-gemmlowp-test) + + ADD_EXECUTABLE(qs8-dwconv-minmax-rndnu-test test/qs8-dwconv-minmax-rndnu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6399,7 +6391,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-dwconv-minmax-rndnu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-dwconv-minmax-rndnu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-dwconv-minmax-rndnu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-dwconv-minmax-rndnu-test qs8-dwconv-minmax-rndnu-test) + + ADD_EXECUTABLE(qs8-gavgpool-minmax-test test/qs8-gavgpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6408,7 +6400,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-gavgpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-gavgpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-gavgpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-gavgpool-test qs8-gavgpool-minmax-test) + + ADD_EXECUTABLE(qs8-gemm-minmax-fp32-test test/qs8-gemm-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6417,7 +6409,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-gemm-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-gemm-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-gemm-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-gemm-minmax-fp32-test qs8-gemm-minmax-fp32-test) + + ADD_EXECUTABLE(qs8-gemm-minmax-gemmlowp-test test/qs8-gemm-minmax-gemmlowp.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6426,7 +6418,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-gemm-minmax-gemmlowp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-gemm-minmax-gemmlowp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-gemm-minmax-gemmlowp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-gemm-minmax-gemmlowp-test qs8-gemm-minmax-gemmlowp-test) + + ADD_EXECUTABLE(qs8-gemm-minmax-rndnu-test test/qs8-gemm-minmax-rndnu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6435,7 +6427,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-gemm-minmax-rndnu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-gemm-minmax-rndnu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-gemm-minmax-rndnu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-gemm-minmax-rndnu-test qs8-gemm-minmax-rndnu-test) + + ADD_EXECUTABLE(qs8-igemm-minmax-fp32-test test/qs8-igemm-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6444,7 +6436,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-igemm-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-igemm-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-igemm-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-igemm-minmax-fp32-test qs8-igemm-minmax-fp32-test) + + ADD_EXECUTABLE(qs8-igemm-minmax-gemmlowp-test test/qs8-igemm-minmax-gemmlowp.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6453,7 +6445,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-igemm-minmax-gemmlowp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-igemm-minmax-gemmlowp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-igemm-minmax-gemmlowp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-igemm-minmax-gemmlowp-test qs8-igemm-minmax-gemmlowp-test) + + ADD_EXECUTABLE(qs8-igemm-minmax-rndnu-test test/qs8-igemm-minmax-rndnu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6462,7 +6454,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-igemm-minmax-rndnu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-igemm-minmax-rndnu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-igemm-minmax-rndnu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-igemm-minmax-rndnu-test qs8-igemm-minmax-rndnu-test) + + ADD_EXECUTABLE(qs8-vadd-minmax-test test/qs8-vadd-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6471,7 +6463,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-vadd-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-vadd-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-vadd-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-vadd-minmax-test qs8-vadd-minmax-test) + + ADD_EXECUTABLE(qs8-vaddc-minmax-test test/qs8-vaddc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6480,7 +6472,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qs8-vaddc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qs8-vaddc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qs8-vaddc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qs8-vaddc-minmax-test qs8-vaddc-minmax-test) + + ADD_EXECUTABLE(qu8-avgpool-minmax-test test/qu8-avgpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6489,7 +6481,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-avgpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-avgpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-avgpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-avgpool-minmax-test qu8-avgpool-minmax-test) + + ADD_EXECUTABLE(qu8-dwconv-minmax-fp32-test test/qu8-dwconv-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6498,7 +6490,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-dwconv-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-dwconv-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-dwconv-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-dwconv-minmax-fp32-test qu8-dwconv-minmax-fp32-test) + + ADD_EXECUTABLE(qu8-dwconv-minmax-rndnu-test test/qu8-dwconv-minmax-rndnu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6507,7 +6499,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-dwconv-minmax-rndnu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-dwconv-minmax-rndnu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-dwconv-minmax-rndnu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-dwconv-minmax-rndnu-test qu8-dwconv-minmax-rndnu-test) + + ADD_EXECUTABLE(qu8-gavgpool-minmax-test test/qu8-gavgpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6516,7 +6508,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-gavgpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-gavgpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-gavgpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-gavgpool-test qu8-gavgpool-minmax-test) + + ADD_EXECUTABLE(qu8-gemm-minmax-fp32-test test/qu8-gemm-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6525,7 +6517,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-gemm-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-gemm-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-gemm-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-gemm-minmax-fp32-test qu8-gemm-minmax-fp32-test) + + ADD_EXECUTABLE(qu8-gemm-minmax-gemmlowp-test test/qu8-gemm-minmax-gemmlowp.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6534,7 +6526,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-gemm-minmax-gemmlowp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-gemm-minmax-gemmlowp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-gemm-minmax-gemmlowp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-gemm-minmax-gemmlowp-test qu8-gemm-minmax-gemmlowp-test) + + ADD_EXECUTABLE(qu8-gemm-minmax-rndnu-test test/qu8-gemm-minmax-rndnu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6543,7 +6535,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-gemm-minmax-rndnu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-gemm-minmax-rndnu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-gemm-minmax-rndnu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-gemm-minmax-rndnu-test qu8-gemm-minmax-rndnu-test) + + ADD_EXECUTABLE(qu8-igemm-minmax-fp32-test test/qu8-igemm-minmax-fp32.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6552,7 +6544,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-igemm-minmax-fp32-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-igemm-minmax-fp32-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-igemm-minmax-fp32-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-igemm-minmax-fp32-test qu8-igemm-minmax-fp32-test) + + ADD_EXECUTABLE(qu8-igemm-minmax-gemmlowp-test test/qu8-igemm-minmax-gemmlowp.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6561,7 +6553,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-igemm-minmax-gemmlowp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-igemm-minmax-gemmlowp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-igemm-minmax-gemmlowp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-igemm-minmax-gemmlowp-test qu8-igemm-minmax-gemmlowp-test) + + ADD_EXECUTABLE(qu8-igemm-minmax-rndnu-test test/qu8-igemm-minmax-rndnu.cc $<TARGET_OBJECTS:all_microkernels> $<TARGET_OBJECTS:packing>) +@@ -6570,7 +6562,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-igemm-minmax-rndnu-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-igemm-minmax-rndnu-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-igemm-minmax-rndnu-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-igemm-minmax-rndnu-test qu8-igemm-minmax-rndnu-test) + + ADD_EXECUTABLE(qu8-requantization-test test/qu8-requantization.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6579,7 +6571,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-requantization-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-requantization-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-requantization-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-requantization-test qu8-requantization-test) + + ADD_EXECUTABLE(qu8-vadd-minmax-test test/qu8-vadd-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6588,7 +6580,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-vadd-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-vadd-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-vadd-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-vadd-minmax-test qu8-vadd-minmax-test) + + ADD_EXECUTABLE(qu8-vaddc-minmax-test test/qu8-vaddc-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6597,7 +6589,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(qu8-vaddc-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(qu8-vaddc-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(qu8-vaddc-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(qu8-vaddc-minmax-test qu8-vaddc-minmax-test) + + ADD_EXECUTABLE(u8-lut32norm-test test/u8-lut32norm.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6606,7 +6598,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(u8-lut32norm-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(u8-lut32norm-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(u8-lut32norm-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(u8-lut32norm-test u8-lut32norm-test) + + ADD_EXECUTABLE(u8-maxpool-minmax-test test/u8-maxpool-minmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6615,7 +6607,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(u8-maxpool-minmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(u8-maxpool-minmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(u8-maxpool-minmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(u8-maxpool-minmax-test u8-maxpool-minmax-test) + + ADD_EXECUTABLE(u8-rmax-test test/u8-rmax.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6624,7 +6616,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(u8-rmax-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(u8-rmax-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(u8-rmax-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(u8-rmax-test u8-rmax-test) + + ADD_EXECUTABLE(u8-vclamp-test test/u8-vclamp.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6633,7 +6625,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(u8-vclamp-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(u8-vclamp-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(u8-vclamp-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(u8-vclamp-test u8-vclamp-test) + + ADD_EXECUTABLE(x32-fill-test test/x32-fill.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6642,7 +6634,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x32-fill-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x32-fill-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x32-fill-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x32-fill-test x32-fill-test) + + ADD_EXECUTABLE(x32-packx-test test/x32-packx.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6651,7 +6643,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x32-packx-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x32-packx-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x32-packx-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x32-packx-test x32-packx-test) + + ADD_EXECUTABLE(x32-pad-test test/x32-pad.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6660,7 +6652,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x32-pad-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x32-pad-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x32-pad-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x32-pad-test x32-pad-test) + + ADD_EXECUTABLE(x32-unpool-test test/x32-unpool.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6669,7 +6661,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x32-unpool-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x32-unpool-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x32-unpool-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x32-unpool-test x32-unpool-test) + + ADD_EXECUTABLE(x32-depthtospace2d-chw2hwc-test test/x32-depthtospace2d-chw2hwc.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6678,7 +6670,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x32-depthtospace2d-chw2hwc-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x32-depthtospace2d-chw2hwc-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x32-depthtospace2d-chw2hwc-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x32-depthtospace2d-chw2hwc-test x32-depthtospace2d-chw2hwc-test) + + ADD_EXECUTABLE(x32-zip-test test/x32-zip.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6687,7 +6679,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x32-zip-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x32-zip-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x32-zip-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x32-zip-test x32-zip-test) + + ADD_EXECUTABLE(x8-lut-test test/x8-lut.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6696,7 +6688,7 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x8-lut-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x8-lut-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x8-lut-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x8-lut-test x8-lut-test) + + ADD_EXECUTABLE(x8-zip-test test/x8-zip.cc $<TARGET_OBJECTS:all_microkernels>) +@@ -6705,20 +6697,12 @@ IF(XNNPACK_BUILD_TESTS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS YES) + TARGET_INCLUDE_DIRECTORIES(x8-zip-test PRIVATE include src test) +- TARGET_LINK_LIBRARIES(x8-zip-test PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(x8-zip-test PRIVATE cpuinfo gtest gtest_main) + ADD_TEST(x8-zip-test x8-zip-test) + ENDIF() + + # ---[ XNNPACK microbenchmarks + IF(XNNPACK_BUILD_BENCHMARKS) +- # ---[ Build google benchmark +- IF(NOT TARGET benchmark) +- SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "") +- ADD_SUBDIRECTORY( +- "${GOOGLEBENCHMARK_SOURCE_DIR}" +- "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark") +- ENDIF() +- + ADD_LIBRARY(bench-utils bench/utils.cc) + SET_TARGET_PROPERTIES(bench-utils PROPERTIES + CXX_STANDARD 11 +@@ -6783,7 +6767,7 @@ IF(XNNPACK_BUILD_BENCHMARKS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(f32-exp-eval PRIVATE include src) +- TARGET_LINK_LIBRARIES(f32-exp-eval PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-exp-eval PRIVATE cpuinfo gtest gtest_main) + + ADD_EXECUTABLE(f32-expm1minus-eval eval/f32-expm1minus.cc $<TARGET_OBJECTS:all_microkernels>) + SET_TARGET_PROPERTIES(f32-expm1minus-eval PROPERTIES +@@ -6791,7 +6775,7 @@ IF(XNNPACK_BUILD_BENCHMARKS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(f32-expm1minus-eval PRIVATE include src) +- TARGET_LINK_LIBRARIES(f32-expm1minus-eval PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-expm1minus-eval PRIVATE cpuinfo gtest gtest_main) + + ADD_EXECUTABLE(f32-expminus-eval eval/f32-expminus.cc $<TARGET_OBJECTS:all_microkernels>) + SET_TARGET_PROPERTIES(f32-expminus-eval PROPERTIES +@@ -6799,7 +6783,7 @@ IF(XNNPACK_BUILD_BENCHMARKS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(f32-expminus-eval PRIVATE include src) +- TARGET_LINK_LIBRARIES(f32-expminus-eval PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-expminus-eval PRIVATE cpuinfo gtest gtest_main) + + ADD_EXECUTABLE(f32-roundne-eval eval/f32-roundne.cc $<TARGET_OBJECTS:all_microkernels>) + SET_TARGET_PROPERTIES(f32-roundne-eval PROPERTIES +@@ -6807,7 +6791,7 @@ IF(XNNPACK_BUILD_BENCHMARKS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(f32-roundne-eval PRIVATE include src) +- TARGET_LINK_LIBRARIES(f32-roundne-eval PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-roundne-eval PRIVATE cpuinfo gtest gtest_main) + + ADD_EXECUTABLE(f32-roundd-eval eval/f32-roundd.cc $<TARGET_OBJECTS:all_microkernels>) + SET_TARGET_PROPERTIES(f32-roundd-eval PROPERTIES +@@ -6815,7 +6799,7 @@ IF(XNNPACK_BUILD_BENCHMARKS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(f32-roundd-eval PRIVATE include src) +- TARGET_LINK_LIBRARIES(f32-roundd-eval PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-roundd-eval PRIVATE cpuinfo gtest gtest_main) + + ADD_EXECUTABLE(f32-roundu-eval eval/f32-roundu.cc $<TARGET_OBJECTS:all_microkernels>) + SET_TARGET_PROPERTIES(f32-roundu-eval PROPERTIES +@@ -6823,7 +6807,7 @@ IF(XNNPACK_BUILD_BENCHMARKS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(f32-roundu-eval PRIVATE include src) +- TARGET_LINK_LIBRARIES(f32-roundu-eval PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-roundu-eval PRIVATE cpuinfo gtest gtest_main) + + ADD_EXECUTABLE(f32-roundz-eval eval/f32-roundz.cc $<TARGET_OBJECTS:all_microkernels>) + SET_TARGET_PROPERTIES(f32-roundz-eval PROPERTIES +@@ -6831,7 +6815,7 @@ IF(XNNPACK_BUILD_BENCHMARKS) + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + TARGET_INCLUDE_DIRECTORIES(f32-roundz-eval PRIVATE include src) +- TARGET_LINK_LIBRARIES(f32-roundz-eval PRIVATE cpuinfo fp16 pthreadpool gtest gtest_main) ++ TARGET_LINK_LIBRARIES(f32-roundz-eval PRIVATE cpuinfo gtest gtest_main) + + # ---[ Build end-to-end microbenchmarks + ADD_LIBRARY(bench-models STATIC diff --git a/gnu/packages/patches/xygrib-fix-finding-data.patch b/gnu/packages/patches/xygrib-fix-finding-data.patch new file mode 100644 index 0000000000..0b718b0eff --- /dev/null +++ b/gnu/packages/patches/xygrib-fix-finding-data.patch @@ -0,0 +1,131 @@ +This is a backport of the commits in PR 235 (“Fixes for packaging on +linux-like systems”), which was merged upstream: + +https://github.com/opengribs/XyGrib/pull/235 + +It fixes finding resources such as icons, maps and translations installed in +the data directory. This patch has been merged upstream and can be removed +with the next release. + +Sightly adapted to find openjpg-2.4. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64059ab65dae..00cc5d6aea6f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,6 +7,9 @@ set(VERSION_PATCH 6) + set(XYGRIB_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") + set(XYGRIB_VERSION_DATE "2019-07-05") + ++option(GNU_PACKAGE "Install into GNU standard directories" OFF) ++option(GEN_TRANSLATIONS "Generate translations" ON) ++ + set(CMAKE_VERBOSE_MAKEFILE ON) + + # Find includes in corresponding build directories +@@ -25,7 +28,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) + set(CMAKE_CXX_STANDARD 11) + #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") + if(UNIX AND NOT APPLE) +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC") ++add_compile_options(-Wall -fPIC) + endif() + + # Add support for address etc sanitizers, part 1/2 (other half after ADD_EXECUTABLE) +@@ -108,17 +111,12 @@ find_path(OPENJPEG_INCLUDE_DIR + ~/Library/Frameworks/include + /Library/Frameworks/include + /usr/local/include +- /usr/local/include/openjpeg-2.3 +- /usr/include/openjpeg-2.3 +- /usr/local/include/openjpeg-2.1 +- /usr/include/openjpeg-2.1 +- /usr/local/include/openjpeg-2.2 +- /usr/include/openjpeg-2.2 + /usr/include + /sw/include # Fink + /opt/local/include # DarwinPorts + /opt/csw/include # Blastwave + /opt/include ++ PATH_SUFFIXES openjpeg-2.4 openjpeg-2.3 openjpeg-2.2 openjpeg-2.1 + REQUIRED + ) + include_directories(${OPENJPEG_INCLUDE_DIR}) +@@ -212,22 +210,24 @@ include_directories(${PNG_INCLUDE_DIR}) + configure_file(cmake/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/Version.h) + include_directories(${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include) + +-if(APPLE) +-set(PREFIX_BIN ${PROJECT_NAME}) +-set(PREFIX_PKGDATA ${PROJECT_NAME}) +-endif() +-if(WIN32) +-set(PREFIX_BIN ".") +-set(PREFIX_PKGDATA ".") +-endif() +-if(UNIX AND NOT APPLE) +-# This is not exactly a good idea on linux - the code should be changed so that the executable would go to /usr/local/bin and the data to /usr/local/share/XyGrib +-set(PREFIX_BIN ${PROJECT_NAME}) +-set(PREFIX_PKGDATA ${PROJECT_NAME}) ++if(GNU_PACKAGE) ++ include(GNUInstallDirs) ++ set(PREFIX_BIN ${CMAKE_INSTALL_FULL_BINDIR}) ++ set(PREFIX_PKGDATA ${CMAKE_INSTALL_FULL_DATADIR}/openGribs/${PROJECT_NAME}) ++else() ++ if(WIN32) ++ set(PREFIX_BIN ".") ++ set(PREFIX_PKGDATA ".") ++ else() ++ set(PREFIX_BIN ${PROJECT_NAME}) ++ set(PREFIX_PKGDATA ${PROJECT_NAME}) ++ endif() + endif() + + add_subdirectory(src) +-add_subdirectory(data/tr) ++if(GEN_TRANSLATIONS) ++ add_subdirectory(data/tr) ++endif() + + # Installation + # macOS bundle parameters +@@ -241,4 +241,14 @@ set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STR + set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION "${XYGRIB_VERSION}") + set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_COPYRIGHT "${PROJECT_NAME} Authors") + # Install data +-install(DIRECTORY data DESTINATION ${PREFIX_PKGDATA}) ++install(DIRECTORY data DESTINATION ${PREFIX_PKGDATA} ++ PATTERN "CMakeFiles" EXCLUDE ++ PATTERN "CMakeLists.txt" EXCLUDE ++ PATTERN "Makefile" EXCLUDE ++ PATTERN "cmake_install.cmake" EXCLUDE) ++if(GNU_PACKAGE) ++ install(FILES debian/xygrib.desktop ++ DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications) ++ install(FILES debian/xygrib.png ++ DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/pixmaps) ++endif() +diff --git a/INSTALL.md b/INSTALL.md +index 2c9d3ab4da03..1190cc780182 100644 +--- a/INSTALL.md ++++ b/INSTALL.md +@@ -22,7 +22,19 @@ https://gihub.com/opengribs/XyGrib/releases or on https://opengribs.org in the d + - openSUSE Tumbleweed: `sudo zypper install gcc git cmake libqt5-qtbase-devel libpng-devel openjpeg2-devel libnova-devel libproj-devel zlib-devel libbz2-devel + + ## Build and package ++### Options + ++XyGrib has two CMake options ++- GNU_PACKAGE (DEFAULT: OFF) ++``` ++Files will be installed in GNU standard installation directories such as prefix/bin and prefix/share. ++Packagers are recommended to test this option. ++``` ++- GEN_TRANSLATION (DEFAULT: ON) ++``` ++Create targets to generate translation files. ++Turning this off removes the need for qt-linguist, part of qttools qt5 submodule, during build. ++``` + ### macOS + + - Get the source |