diff options
author | mmokhi <mmokhi@FreeBSD.org> | 2018-12-26 20:08:25 +0800 |
---|---|---|
committer | mmokhi <mmokhi@FreeBSD.org> | 2018-12-26 20:08:25 +0800 |
commit | 210a945c31de504d61607c67f8130d1d74394c5b (patch) | |
tree | 8dcdd0da6cac07413af88c2bddac2675ae0630da | |
parent | a78ff24f54fd2c8ae44018e09653f6713c8be9d6 (diff) | |
download | freebsd-ports-gnome-210a945c31de504d61607c67f8130d1d74394c5b.tar.gz freebsd-ports-gnome-210a945c31de504d61607c67f8130d1d74394c5b.tar.zst freebsd-ports-gnome-210a945c31de504d61607c67f8130d1d74394c5b.zip |
databases/mysql57-server: Fix build for i386
Make MySQL build-script assume that FreeBSD's Clang (on i386)
doesn't have "atomic_*" functions builtin implemented.
This is added to cmake/os/FreeBSD.cmake to make the merge for upstream easier.
PR: 229605
Reported by: gbromov@gmail.com
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | databases/mysql57-server/Makefile | 2 | ||||
-rw-r--r-- | databases/mysql57-server/files/patch-cmake_os_FreeBSD.cmake | 31 |
2 files changed, 32 insertions, 1 deletions
diff --git a/databases/mysql57-server/Makefile b/databases/mysql57-server/Makefile index c460abb18d81..534cd28163cc 100644 --- a/databases/mysql57-server/Makefile +++ b/databases/mysql57-server/Makefile @@ -3,7 +3,7 @@ PORTNAME?= mysql PORTVERSION= 5.7.24 -PORTREVISION?= 3 +PORTREVISION?= 4 CATEGORIES= databases ipv6 MASTER_SITES= MYSQL/MySQL-5.7 PKGNAMESUFFIX?= 57-server diff --git a/databases/mysql57-server/files/patch-cmake_os_FreeBSD.cmake b/databases/mysql57-server/files/patch-cmake_os_FreeBSD.cmake new file mode 100644 index 000000000000..64b809e3bd45 --- /dev/null +++ b/databases/mysql57-server/files/patch-cmake_os_FreeBSD.cmake @@ -0,0 +1,31 @@ +--- cmake/os/FreeBSD.cmake.orig 2018-10-04 05:48:22 UTC ++++ cmake/os/FreeBSD.cmake +@@ -30,6 +30,20 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER) + IF(NOT HAVE_SUPPORTED_CLANG_VERSION) + MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!") + ENDIF() ++ CHECK_C_SOURCE_RUNS(" ++ int main() ++ { ++ return (__clang_major__ >= 4); ++ }" I386_ATOMIC_BUILTINS) ++ IF((CMAKE_SYSTEM_PROCESSOR MATCHES "i386") AND (NOT I386_ATOMIC_BUILTINS)) ++ SET(HAVE_GCC_ATOMIC_BUILTINS CACHE INTERNAL "") ++ ENDIF() ++ ELSEIF(CMAKE_COMPILER_IS_GNUCC) ++ EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion ++ OUTPUT_VARIABLE GCC_VERSION) ++ IF(GCC_VERSION VERSION_LESS 4.4) ++ MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!") ++ ENDIF() + ELSE() + MESSAGE(FATAL_ERROR "Unsupported compiler!") + ENDIF() +@@ -38,4 +52,6 @@ ENDIF() + # Should not be needed any more, but kept for easy resurrection if needed + # #Legacy option, maybe not needed anymore , taken as is from autotools build + # ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000) +- ++# For GCC maybe it's also good idea to use ++# ADD_DEFINITIONS(-D_GNU_SOURCE) ++ |