diff --git a/databases/xtrabackup8/Makefile b/databases/xtrabackup8/Makefile index a3b6832ae297..ad3f526b4f62 100644 --- a/databases/xtrabackup8/Makefile +++ b/databases/xtrabackup8/Makefile @@ -39,13 +39,23 @@ CMAKE_ARGS= -DBUILD_CONFIG:STRING=xtrabackup_release CMAKE_ARGS+= -DWITH_${component}:STRING=system .endfor -post-patch: +# Since MySQL 8.0.20 InnoDB engine uses new memory alligned allocator +# which is broken on i386 due to different size of types and causes a +# 'static_assert(alignof(T) <= alignof(std::max_align_t))' error +.if ${ARCH} == i386 +CMAKE_ARGS+= -DDISABLE_PSI_MEMORY=1 +.endif + +post-extract: # Delete bundled components so we won't accidentally use them, except LZ4 # which cannot be removed just yet @${MV} ${WRKSRC}/extra/lz4 ${WRKSRC} @${RM} -r ${WRKSRC}/extra/* @${MV} ${WRKSRC}/lz4 ${WRKSRC}/extra +post-patch: + @${REINPLACE_CMD} -e 's,TRUE,true,' ${WRKSRC}/sql/mysqld.cc + post-stage: @${RM} -r ${STAGEDIR}${PREFIX}/docs @${RMDIR} ${STAGEDIR}${PREFIX}/lib/plugin/debug diff --git a/databases/xtrabackup8/files/patch-storage_temptable_include_temptable_lock_free_type.h b/databases/xtrabackup8/files/patch-storage_temptable_include_temptable_lock_free_type.h new file mode 100644 index 000000000000..b847ce64d5da --- /dev/null +++ b/databases/xtrabackup8/files/patch-storage_temptable_include_temptable_lock_free_type.h @@ -0,0 +1,17 @@ +--- storage/temptable/include/temptable/lock_free_type.h.orig 2020-06-16 16:31:03 UTC ++++ storage/temptable/include/temptable/lock_free_type.h +@@ -31,6 +31,14 @@ Lock-free type (selection) implementation. */ + + #include "storage/temptable/include/temptable/constants.h" + ++#if defined(__i386__) //&& defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) ++/* Fix for clang setting __GCC_ATOMIC_LLONG_LOCK_FREE incorecctly for x86 ++ * https://llvm.org/bugs/show_bug.cgi?id=19355 ++ */ ++#undef ATOMIC_LLONG_LOCK_FREE ++#define ATOMIC_LLONG_LOCK_FREE 2 ++#endif ++ + namespace temptable { + + /** Enum class describing alignment-requirements. */