Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/grpc: add explicitly link with libatomic
@ 2018-12-07 17:12 Ryan Barnett
  2018-12-07 18:03 ` robert rose
  2018-12-31 14:54 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Ryan Barnett @ 2018-12-07 17:12 UTC (permalink / raw)
  To: buildroot

On some architectures, you must link with libatomic, on some other
architectures, they are available built-in, but in all cases, linking
against libatomic does not harm.

Fixes:
  http://autobuild.buildroot.org/results/2f2/2f208fbfe4e9da94be5b9c030dbd278cb8ba053c/

Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
---
 package/grpc/grpc.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/grpc/grpc.mk b/package/grpc/grpc.mk
index 6ca6536fff..527c7fa7e2 100644
--- a/package/grpc/grpc.mk
+++ b/package/grpc/grpc.mk
@@ -23,6 +23,12 @@ GRPC_CONF_OPTS = \
 	-DgRPC_ZLIB_PROVIDER=package \
 	-DgRPC_NATIVE_CPP_PLUGIN=$(HOST_DIR)/bin/grpc_cpp_plugin
 
+# grpc can uses __atomic builtins, so we need to link with
+# libatomic for the architectures who need libatomic.
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GRPC_CONF_OPTS += -DCMAKE_C_STANDARD_LIBRARIES="-latomic"
+endif
+
 HOST_GRPC_CONF_OPTS = \
 	-D_gRPC_CARES_LIBRARIES=cares \
 	-DgRPC_CARES_PROVIDER=none \
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-31 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07 17:12 [Buildroot] [PATCH 1/1] package/grpc: add explicitly link with libatomic Ryan Barnett
2018-12-07 18:03 ` robert rose
2018-12-31 14:54 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox