Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 2020 10:19:17 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r554946 - in head/databases/xtrabackup8: . files
Message-ID:  <202011121019.0ACAJH86004308@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Thu Nov 12 10:19:17 2020
New Revision: 554946
URL: https://svnweb.freebsd.org/changeset/ports/554946

Log:
  Allow to build on FreeBSD pre-12.x and i386 by stealing some patches
  from the `databases/mysql80-server' port.
  
  Suggested by:	fluffy

Added:
  head/databases/xtrabackup8/files/patch-storage_temptable_include_temptable_lock_free_type.h   (contents, props changed)
Modified:
  head/databases/xtrabackup8/Makefile

Modified: head/databases/xtrabackup8/Makefile
==============================================================================
--- head/databases/xtrabackup8/Makefile	Thu Nov 12 10:16:14 2020	(r554945)
+++ head/databases/xtrabackup8/Makefile	Thu Nov 12 10:19:17 2020	(r554946)
@@ -39,12 +39,22 @@ 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

Added: head/databases/xtrabackup8/files/patch-storage_temptable_include_temptable_lock_free_type.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/xtrabackup8/files/patch-storage_temptable_include_temptable_lock_free_type.h	Thu Nov 12 10:19:17 2020	(r554946)
@@ -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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011121019.0ACAJH86004308>