Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 760827 Details for
Bug 828065
dev-db/mariadb-10.6.5-r1: missing library atomic in RISC-V
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix-check-libatomic.patch
mariadb-fix-libatomic.patch.patch (text/plain), 2.54 KB, created by
Alex Fan
on 2021-12-30 11:08:37 UTC
(
hide
)
Description:
fix-check-libatomic.patch
Filename:
MIME Type:
Creator:
Alex Fan
Created:
2021-12-30 11:08:37 UTC
Size:
2.54 KB
patch
obsolete
>From b799ec0d96d112b6be4284667f3ead9f2837f5da Mon Sep 17 00:00:00 2001 >From: alexfanqi <alex.fan.q@gmail.com> >Date: Fri, 17 Dec 2021 21:23:32 +1100 >Subject: [PATCH] improve checks for libatomic linking > >This code piece is adapted from https://github.com/KDE/krita/blob/451e1415fd1b3a0f9c24de2fd4707d1b1e164236/cmake/modules/CheckAtomic.cmake#L23 > >Fixes: f502ccbcb5dfce29067434885a23db8d1bd5f134 >Fixes: https://bugs.gentoo.org/828065 >Tested-by: Yixun Lan <dlan@gentoo.org> >Reviewed-by: Daniel Black >--- > configure.cmake | 26 ++++++++++++++++++++------ > storage/rocksdb/CMakeLists.txt | 3 ++- > 2 files changed, 22 insertions(+), 7 deletions(-) > >diff --git a/configure.cmake b/configure.cmake >index db8742bb93b5a..cbcdab5e4f951 100644 >--- a/configure.cmake >+++ b/configure.cmake >@@ -891,9 +891,16 @@ HAVE_GCC_ATOMIC_BUILTINS) > 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); >+ char x=1; >+ short y=1; >+ int z=1; >+ long w = 1; >+ long long s = 1; >+ x = __atomic_add_fetch(&x, 1, __ATOMIC_SEQ_CST); >+ y = __atomic_add_fetch(&y, 1, __ATOMIC_SEQ_CST); >+ z = __atomic_add_fetch(&z, 1, __ATOMIC_SEQ_CST); >+ w = __atomic_add_fetch(&w, 1, __ATOMIC_SEQ_CST); >+ return (int)__atomic_load_n(&s, __ATOMIC_SEQ_CST); > }" > HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) > IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) >@@ -904,9 +911,16 @@ ELSE() > 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); >+ char x=1; >+ short y=1; >+ int z=1; >+ long w = 1; >+ long long s = 1; >+ x = __atomic_add_fetch(&x, 1, __ATOMIC_SEQ_CST); >+ y = __atomic_add_fetch(&y, 1, __ATOMIC_SEQ_CST); >+ z = __atomic_add_fetch(&z, 1, __ATOMIC_SEQ_CST); >+ w = __atomic_add_fetch(&w, 1, __ATOMIC_SEQ_CST); >+ return (int)__atomic_load_n(&s, __ATOMIC_SEQ_CST); > }" > HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) > IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) >diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt >index b0d28f5636a43..0eca862aaa841 100644 >--- a/storage/rocksdb/CMakeLists.txt >+++ b/storage/rocksdb/CMakeLists.txt >@@ -129,7 +129,8 @@ SET(ROCKSDB_SE_SOURCES > # This is a strong requirement coming from RocksDB. No conditional checks here. > #ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX > #) >-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64") >+ >+if (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) > SET(ATOMIC_EXTRA_LIBS -latomic) > else() > SET(ATOMIC_EXTRA_LIBS)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 828065
:
757253
| 760827