Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
mariadb.20858
mariadb-10.2.19-link-and-enable-c++11-atomics.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mariadb-10.2.19-link-and-enable-c++11-atomics.patch of Package mariadb.20858
Author: Vicențiu Ciorbaru <vicentiu@mariadb.org> Date: Fri Dec 21 19:14:04 2018 +0200 Link with libatomic to enable C11 atomics support Some architectures (mips) require libatomic to support proper atomic operations. Check first if support is available without linking, otherwise use the library. Index: mariadb-10.5.8/configure.cmake =================================================================== --- mariadb-10.5.8.orig/configure.cmake +++ mariadb-10.5.8/configure.cmake @@ -861,7 +861,25 @@ int main() long long int *ptr= &var; return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); }" -HAVE_GCC_C11_ATOMICS) +HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) +IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) + SET(HAVE_GCC_C11_ATOMICS True) +ELSE() + SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) + LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") + CHECK_CXX_SOURCE_COMPILES(" + int main() + { + long long int var= 1; + long long int *ptr= &var; + return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + }" + HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + SET(HAVE_GCC_C11_ATOMICS True) + ENDIF() + SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) +ENDIF() IF(WITH_VALGRIND) SET(HAVE_valgrind 1) Index: mariadb-10.5.8/mysys/CMakeLists.txt =================================================================== --- mariadb-10.5.8.orig/mysys/CMakeLists.txt +++ mariadb-10.5.8/mysys/CMakeLists.txt @@ -140,6 +140,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO}) DTRACE_INSTRUMENT(mysys) +IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + TARGET_LINK_LIBRARIES(mysys atomic) +ENDIF() + IF(HAVE_BFD_H) TARGET_LINK_LIBRARIES(mysys bfd) ENDIF(HAVE_BFD_H) Index: mariadb-10.5.8/sql/CMakeLists.txt =================================================================== --- mariadb-10.5.8.orig/sql/CMakeLists.txt +++ mariadb-10.5.8/sql/CMakeLists.txt @@ -215,6 +215,10 @@ ELSE() SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) ENDIF() +IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + TARGET_LINK_LIBRARIES(sql atomic) +ENDIF() + IF(MSVC OR CMAKE_SYSTEM_NAME MATCHES AIX) SET(libs_to_export_symbols sql mysys dbug strings) # Create shared library of already compiled object
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor