summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-06-27 06:41:55 +0000
committernia <nia@pkgsrc.org>2021-06-27 06:41:55 +0000
commit62b8be3087fcb1cc5d5a0a0764f7020dae218df8 (patch)
treeeaf9ae0e9457048c8a1edd8cd31a5e83079f74dc
parentd7fa5c0bc85fde2447ea4ba061498e33fbfb5b11 (diff)
downloadpkgsrc-62b8be3087fcb1cc5d5a0a0764f7020dae218df8.tar.gz
mysql80: use __builtin_ffsll where ffsll is missing
mysql80 uses some inline asm on x86_64, but falls back to the function on non-x86_64. netbsd does not have a ffsll function. helps build on non-x86_64.
-rw-r--r--databases/mysql80-client/distinfo3
-rw-r--r--databases/mysql80-client/patches/patch-sql_join__optimizer_bit__utils.h15
2 files changed, 17 insertions, 1 deletions
diff --git a/databases/mysql80-client/distinfo b/databases/mysql80-client/distinfo
index 1a4d7b1ba60..f26304efea8 100644
--- a/databases/mysql80-client/distinfo
+++ b/databases/mysql80-client/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2021/06/22 10:12:36 nia Exp $
+$NetBSD: distinfo,v 1.3 2021/06/27 06:41:55 nia Exp $
SHA1 (mysql-boost-8.0.24.tar.gz) = e640d9851c1721a0550bdca38f03cb8681d61862
RMD160 (mysql-boost-8.0.24.tar.gz) = 2577eb94d5b8651f3520706be9c40c3e924980d4
@@ -31,5 +31,6 @@ SHA1 (patch-scripts_mysqld_safe.sh) = 0784314227657aa0bc3f4a0b4e21c173a86fa94b
SHA1 (patch-sql_CMakeLists.txt) = 84af2f2e58a17bde292a665a726489b8f56f4132
SHA1 (patch-sql_conn__handler_socket__connection.cc) = b414e0d499f51750e1aa6e9dd7b4e7006456a079
SHA1 (patch-sql_item_geofunc_relchecks_bgwrap.h) = d20896bfe2391d30aa9e95834c77e7de03377d76
+SHA1 (patch-sql_join__optimizer_bit__utils.h) = 3e75331da6b50935f082b2f738e6c6964afef5f7
SHA1 (patch-sql_resourcegroups_platform_thread__attrs__api__apple.cc) = e08ed53790ac8b03b38d566fee3a2688ca6065b3
SHA1 (patch-vio_viosocket.cc) = 15dcc0dee88e736a844aacc02e9dbc6beeb915e4
diff --git a/databases/mysql80-client/patches/patch-sql_join__optimizer_bit__utils.h b/databases/mysql80-client/patches/patch-sql_join__optimizer_bit__utils.h
new file mode 100644
index 00000000000..80b5c8aefc8
--- /dev/null
+++ b/databases/mysql80-client/patches/patch-sql_join__optimizer_bit__utils.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-sql_join__optimizer_bit__utils.h,v 1.1 2021/06/27 06:41:55 nia Exp $
+
+NetBSD has no ffsll, but GCC does.
+
+--- sql/join_optimizer/bit_utils.h.orig 2021-03-22 08:44:50.000000000 +0000
++++ sql/join_optimizer/bit_utils.h
+@@ -82,6 +82,8 @@ static inline size_t FindLowestBitSet(ui
+ size_t idx;
+ asm("bsfq %1,%q0" : "=r"(idx) : "rm"(x));
+ return idx;
++#elif defined(__GNUC__) && !defined(HAVE_FFSLL)
++ return static_cast<unsigned>(__builtin_ffsll(x)) - 1u;
+ #else
+ // The cast to unsigned at least gets rid of the sign extension.
+ return static_cast<unsigned>(ffsll(x)) - 1u;