All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit branch/2019.11.x] package/grpc: add workaround for gcc<5
Date: Sun, 12 Jan 2020 11:09:14 +0100	[thread overview]
Message-ID: <20200112102020.8DE918B458@busybox.osuosl.org> (raw)

commit: https://git.buildroot.net/buildroot/commit/?id=e049de5f7c6dac2b884b493d6cf4f733323b0eb3
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2019.11.x

Fixes:
http://autobuild.buildroot.net/results/3d5/3d5e0b2b8c6670cf9a43ceac4b8173760e1f933c/

Commit e0e54afd0cf7 (package/grpc: bump to version 1.25.0) bumped the grpc
version and added a workaround for 'failure memory model cannot be stronger
than success memory model for '__atomic_compare_exchange'.  This workaround
is also needed for 1.23.0, so add it here as well.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/grpc/grpc.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/grpc/grpc.mk b/package/grpc/grpc.mk
index 569db12089..b3d5433105 100644
--- a/package/grpc/grpc.mk
+++ b/package/grpc/grpc.mk
@@ -48,6 +48,14 @@ GRPC_CFLAGS += -O0
 GRPC_CXXFLAGS += -O0
 endif
 
+# Toolchains older than gcc5 will fail to compile with -0s due to:
+# error: failure memory model cannot be stronger than success memory model for
+# '__atomic_compare_exchange', so we use -O2 in these cases
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5):$(BR2_OPTIMIZE_S),:y)
+GRPC_CFLAGS += -O2
+GRPC_CXXFLAGS += -O2
+endif
+
 GRPC_CONF_OPTS += \
 	-DCMAKE_C_FLAGS="$(GRPC_CFLAGS)" \
 	-DCMAKE_CXX_FLAGS="$(GRPC_CXXFLAGS)"

                 reply	other threads:[~2020-01-12 10:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200112102020.8DE918B458@busybox.osuosl.org \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.