summaryrefslogblamecommitdiff
path: root/user/mariadb/ppchax.patch
blob: 26ffb5189fcffacd032b27632ded30a79b2499c2 (plain) (tree)

























                                                                                   
--- mariadb-10.4.6/configure.cmake.old	2019-06-17 22:00:31.000000000 +0000
+++ mariadb-10.4.6/configure.cmake	2019-07-06 23:21:57.705655766 +0000
@@ -922,6 +922,10 @@
   return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
 }"
 HAVE_GCC_C11_ATOMICS)
+IF(NOT HAVE_GCC_C11_ATOMICS AND CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
+  SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} atomic)
+  SET(HAVE_GCC_C11_ATOMICS 1)
+ENDIF()
 
 IF(WITH_VALGRIND)
   SET(HAVE_valgrind 1)
--- mariadb-10.4.6/mysys/CMakeLists.txt.old	2019-06-17 22:00:32.000000000 +0000
+++ mariadb-10.4.6/mysys/CMakeLists.txt	2019-07-07 00:03:56.956394100 +0000
@@ -91,6 +91,10 @@
   TARGET_LINK_LIBRARIES(mysys pthread)
 ENDIF()
 
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
+  TARGET_LINK_LIBRARIES(mysys atomic)
+ENDIF()
+
 ADD_EXECUTABLE(thr_lock thr_lock.c)
 TARGET_LINK_LIBRARIES(thr_lock mysys)
 SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN")