summaryrefslogblamecommitdiff
path: root/user/mariadb/ppchax.patch
blob: 4ce0d304b73c247b1c69d69932b5cc0ff1de96e4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
                                                                           
                    










                                                                                   
                  








                                                                  
--- 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
@@ -867,6 +867,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
@@ -92,6 +92,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")