diff mbox series

[oe,meta-networking,1/2] grpc: Link with libatomic on clang/x86

Message ID 20191119011629.3835732-1-raj.khem@gmail.com
State Accepted
Commit f7a7a2aafe87437aefca21612dc156fde645ac89
Headers show
Series [oe,meta-networking,1/2] grpc: Link with libatomic on clang/x86 | expand

Commit Message

Khem Raj Nov. 19, 2019, 1:16 a.m. UTC
clang does delegate the atomic<double> calls to libatomic on x86 where
as gcc tries to use intrinsics, its debatable who is right, but it does
seem that clang is safe in case pointer is unaligned

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.24.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb b/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb
index ecc575bcfb..24072c0832 100644
--- a/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb
+++ b/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb
@@ -42,6 +42,10 @@  do_configure_prepend_mipsarch() {
     sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt
 }
 
+do_configure_prepend_toolchain-clang_x86() {
+    sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt
+}
+
 BBCLASSEXTEND = "native nativesdk"
 
 SYSROOT_DIRS_BLACKLIST_append_class-target = "${libdir}/cmake/grpc"