summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-03-02 18:43:16 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-03-02 18:43:16 +0000
commitba9f8de67ed96731d4b6f6e9c73df056793a9e0c (patch)
treec4f1c1c74fc83d90c78770f32430cc385de94034 /databases
parent518e34bd77b947ae873e3a3bc5608df225f168fc (diff)
downloadfreebsd-ports-ba9f8de67ed96731d4b6f6e9c73df056793a9e0c.zip
databases/mysql80-server: fix build of client on powerpc
On powerpc, clang miscompiles comp_err, which later fails at runtime with: -> 0x102ff48c <+16>: .long 0x0006ee74 ; unknown opcode The problem happens because of line: frame #0: 0x10323eb4 comp_err`set_my_errno(my_errno=-10608) at my_thr_init.cc:344:47 GCC can compile client, but without -malign-double. It also needs to link to libatomic (so building without GCC installed wouldn't work anyway). This only fixes client. Server still fails to build because of: /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.32/storage/innobase/include/log0sys.h:190:60: error: static assertion failed 190 | static_assert(decltype(write_to_file_requests_interval)::is_always_lock_free);
Diffstat (limited to 'databases')
-rw-r--r--databases/mysql80-server/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/databases/mysql80-server/Makefile b/databases/mysql80-server/Makefile
index e85c20172dd2..06864573e5f2 100644
--- a/databases/mysql80-server/Makefile
+++ b/databases/mysql80-server/Makefile
@@ -15,8 +15,8 @@ LICENSE= GPLv2
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}${DISTVERSIONSUFFIX}
SLAVEDIRS= databases/mysql80-client
-USES= bison:build cmake:noninja compiler:c++17-lang cpe \
- groff:run libedit localbase ncurses perl5 pkgconfig shebangfix ssl
+USES= bison:build cmake:noninja cpe groff:run libedit localbase \
+ ncurses perl5 pkgconfig shebangfix ssl
CPE_VENDOR= oracle
@@ -53,7 +53,7 @@ BUILD_DEPENDS_powerpc64= libunwind>0:devel/libunwind
BUILD_DEPENDS_powerpc64le= libunwind>0:devel/libunwind
CMAKE_BUILD_TYPE= Release
-CFLAGS+= -fPIC -malign-double
+CFLAGS+= -fPIC
CFLAGS_aarch64?= -march=armv8-a+crc+crypto
CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \
@@ -184,6 +184,14 @@ FEDERATED_SUB_LIST_OFF+= FEDER=""
SSP_UNSAFE= yes
.endif
+.if ${ARCH} == powerpc
+LDFLAGS+= -latomic
+USES+= compiler:gcc-c++11-lib
+.else
+CXXFLAGS+= -malign-double
+USES+= compiler:c++17-lang
+.endif
+
post-extract:
@${RM} -rv ${WRKSRC}/sql/sql_hints.yy.cc ${WRKSRC}/sql/sql_hints.yy.h