commit: a18cfdc0a82e68bef4be309386ad4ca65a9006e9 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Thu Jan 9 04:17:40 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jan 9 10:31:58 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a18cfdc0
dev-db/mysql: fix abseil-cpp issue with certain compiler flags * Use patch supplied by Byron Stanoszek. Closes: https://bugs.gentoo.org/935508 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/mysql-8.0.37-fix-bundled-abseil.patch | 30 ++++++++++++++++++++++ dev-db/mysql/mysql-8.0.37.ebuild | 2 ++ 2 files changed, 32 insertions(+) diff --git a/dev-db/mysql/files/mysql-8.0.37-fix-bundled-abseil.patch b/dev-db/mysql/files/mysql-8.0.37-fix-bundled-abseil.patch new file mode 100644 index 000000000000..654b2bc21be6 --- /dev/null +++ b/dev-db/mysql/files/mysql-8.0.37-fix-bundled-abseil.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/935508 + +Context: +https://bugs.gentoo.org/934337 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112789 + +--- mysql/extra/abseil/abseil-cpp-20230802.1/absl/numeric/internal/bits.h.bak ++++ mysql/extra/abseil/abseil-cpp-20230802.1/absl/numeric/internal/bits.h +@@ -167,7 +167,9 @@ CountLeadingZeroes32(uint32_t x) { + + ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CLZ inline int + CountLeadingZeroes16(uint16_t x) { +-#if ABSL_HAVE_BUILTIN(__builtin_clzs) ++#if ABSL_HAVE_BUILTIN(__builtin_clzg) ++ return x == 0 ? 16 : __builtin_clzg(x); ++#elif ABSL_HAVE_BUILTIN(__builtin_clzs) + static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int) + "__builtin_clzs does not take 16-bit arg"); + return x == 0 ? 16 : __builtin_clzs(x); +@@ -303,7 +305,9 @@ CountTrailingZeroesNonzero64(uint64_t x) { + + ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CTZ inline int + CountTrailingZeroesNonzero16(uint16_t x) { +-#if ABSL_HAVE_BUILTIN(__builtin_ctzs) ++#if ABSL_HAVE_BUILTIN(__builtin_ctzg) ++ return __builtin_ctzg(x); ++#elif ABSL_HAVE_BUILTIN(__builtin_ctzs) + static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int) + "__builtin_ctzs does not take 16-bit arg"); + return __builtin_ctzs(x); diff --git a/dev-db/mysql/mysql-8.0.37.ebuild b/dev-db/mysql/mysql-8.0.37.ebuild index e96f1f6700c5..2d40fbcfa289 100644 --- a/dev-db/mysql/mysql-8.0.37.ebuild +++ b/dev-db/mysql/mysql-8.0.37.ebuild @@ -94,6 +94,8 @@ PATCHES=( "${WORKDIR}"/mysql-patches # Needed due to bundled boost-1.77, this fix is included in boost-1.81 "${FILESDIR}"/mysql-8.0.36-boost-clang-fix.patch + # Needed due to bundles abseil-cpp, this fix is included in abseil-cpp-20240722 + "${FILESDIR}"/mysql-8.0.37-fix-bundled-abseil.patch ) mysql_init_vars() {
