From 4df41e201f12d045360fcd50ed3e88a7330cc3f8 Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Tue, 15 Jun 2021 10:56:50 +0200 Subject: [PATCH 1/3] mariadb103-server: patch and unbreak on riscv64 RISC-V does not have FP exceptions and nobody has bothered to stub out the fpsetmask() calls. Remove these calls on platforms that don't support them to unbreak the build. --- databases/mariadb103-server/Makefile | 4 +--- .../files/patch-sql_mysqld.cc | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/databases/mariadb103-server/Makefile b/databases/mariadb103-server/Makefile index 8e7d31926ace..cfeb42f1979f 100644 --- a/databases/mariadb103-server/Makefile +++ b/databases/mariadb103-server/Makefile @@ -2,7 +2,7 @@ PORTNAME?= mariadb PORTVERSION= 10.3.29 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= databases MASTER_SITES= http://mirrors.supportex.net/${SITESDIR}/ \ http://mirror2.hs-esslingen.de/pub/Mirrors/${SITESDIR}/ \ @@ -20,8 +20,6 @@ COMMENT?= Multithreaded SQL database (server) LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_riscv64= fails to compile: needs FP_X_INV from empty sys/riscv/include/ieeefp.h - SUB_FILES= pkg-message PKGMESSAGE= ${WRKDIR}/pkg-message diff --git a/databases/mariadb103-server/files/patch-sql_mysqld.cc b/databases/mariadb103-server/files/patch-sql_mysqld.cc index ab4a1ed810a5..4109d800da4c 100644 --- a/databases/mariadb103-server/files/patch-sql_mysqld.cc +++ b/databases/mariadb103-server/files/patch-sql_mysqld.cc @@ -1,6 +1,24 @@ ---- sql/mysqld.cc.orig 2017-05-14 23:13:18 UTC +--- sql/mysqld.cc.orig 2021-05-05 15:26:23 UTC +++ sql/mysqld.cc -@@ -4838,8 +4840,9 @@ static void init_ssl() +@@ -206,7 +206,7 @@ typedef fp_except fp_except_t; + + inline void setup_fpu() + { +-#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT) ++#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT) && defined(FP_X_INV) + /* We can't handle floating point exceptions with threads, so disable + this on freebsd + Don't fall for overflow, underflow,divide-by-zero or loss of precision. +@@ -219,7 +219,7 @@ inline void setup_fpu() + fpsetmask(~(FP_X_INV | FP_X_OFL | FP_X_UFL | FP_X_DZ | + FP_X_IMP)); + #endif /* FP_X_DNML */ +-#endif /* __FreeBSD__ && HAVE_IEEEFP_H && !HAVE_FEDISABLEEXCEPT */ ++#endif /* __FreeBSD__ && HAVE_IEEEFP_H && !HAVE_FEDISABLEEXCEPT && defined(FP_X_INV) */ + + #ifdef HAVE_FEDISABLEEXCEPT + fedisableexcept(FE_ALL_EXCEPT); +@@ -5033,8 +5033,9 @@ static void init_ssl() while ((err= ERR_get_error())) sql_print_warning("SSL error: %s", ERR_error_string(err, NULL)); } -- 2.31.1