[Buildroot] [PATCH 1/1] package/grpc: add explicitly link with libatomic

robert rose robertroyrose at gmail.com
Fri Dec 7 18:03:54 UTC 2018


Reviewed-by: Robert Rose <robertroyrose at gmail.com>

On Fri, Dec 7, 2018 at 9:12 AM Ryan Barnett <
ryan.barnett at rockwellcollins.com> wrote:

> 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 at 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181207/f3b0fdcf/attachment.html>


More information about the buildroot mailing list