diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch')
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch new file mode 100644 index 00000000..05b0cf8f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch @@ -0,0 +1,34 @@ +From f447aca534d1a12809eeb146e8220d305cc3884d Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Thu, 9 Apr 2020 14:07:19 +0800 +Subject: [PATCH] build_rocksdb.cmake: fix atomic support on arm + +Check to link with libatomic to enable C11 atomics support +to fix below build error on arm: +| /build/tmp/work/armv5e-wrs-linux-gnueabi/mariadb/10.3.13-r0/recipe-sysroot-native/usr/bin/arm-wrs-linux-gnueabi/../../libexec/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/8.3.0/ld.bfd: librocksdblib.a(env_posix.cc.o): in function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)': +| /usr/include/c++/8.3.0/bits/atomic_base.h:374: undefined reference to `__atomic_store_8' + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + storage/rocksdb/build_rocksdb.cmake | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake +index d7895b0..3bcd52a 100644 +--- a/storage/rocksdb/build_rocksdb.cmake ++++ b/storage/rocksdb/build_rocksdb.cmake +@@ -470,6 +470,9 @@ list(APPEND SOURCES ${CMAKE_CURRENT_BINARY_DIR}/build_version.cc) + + ADD_CONVENIENCE_LIBRARY(rocksdblib ${SOURCES}) + target_link_libraries(rocksdblib ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ TARGET_LINK_LIBRARIES(rocksdblib atomic) ++ENDIF() + IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -Wno-error") + endif() +-- +2.7.4 + |