Changeset View
Changeset View
Standalone View
Standalone View
head/databases/xtrabackup/files/patch-cmake_os_FreeBSD.cmake
--- cmake/os/FreeBSD.cmake.orig 2019-07-19 15:13:48 UTC | --- cmake/os/FreeBSD.cmake.orig 2020-05-26 05:35:19 UTC | ||||
+++ cmake/os/FreeBSD.cmake | +++ cmake/os/FreeBSD.cmake | ||||
@@ -30,6 +30,12 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER) | @@ -36,6 +36,20 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER) | ||||
IF(NOT HAVE_SUPPORTED_CLANG_VERSION) | IF(GCC_VERSION VERSION_LESS 4.4) | ||||
MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!") | MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!") | ||||
ENDIF() | 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) | + ELSEIF(CMAKE_COMPILER_IS_GNUCC) | ||||
+ EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion | + EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion | ||||
+ OUTPUT_VARIABLE GCC_VERSION) | + OUTPUT_VARIABLE GCC_VERSION) | ||||
+ IF(GCC_VERSION VERSION_LESS 4.4) | + IF(GCC_VERSION VERSION_LESS 4.4) | ||||
+ MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!") | + MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!") | ||||
+ ENDIF() | + ENDIF() | ||||
ELSE() | ELSE() | ||||
MESSAGE(FATAL_ERROR "Unsupported compiler!") | MESSAGE(FATAL_ERROR "Unsupported compiler!") | ||||
ENDIF() | ENDIF() | ||||
@@ -44,4 +58,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) | |||||
+ |