Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libgeos: fix build failure due to Gcc Bug 68485
Date: Fri, 12 Feb 2021 23:42:38 +0100	[thread overview]
Message-ID: <20210212224238.1938197-1-giulio.benetti@benettiengineering.com> (raw)

Package libgeos manifests Microblaze Gcc Bug 68485 resulting in a build
failure due to an Internal Compiler Error.

As done for other packages in Buildroot work around this Gcc Bug by
setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y.

Fixes:
http://autobuild.buildroot.net/results/0da/0daa6b259aea5381fad86d01e6dd026b1c8ad073/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/libgeos/libgeos.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/libgeos/libgeos.mk b/package/libgeos/libgeos.mk
index 50c3832c01..a355732af8 100644
--- a/package/libgeos/libgeos.mk
+++ b/package/libgeos/libgeos.mk
@@ -13,8 +13,16 @@ LIBGEOS_INSTALL_STAGING = YES
 LIBGEOS_CONFIG_SCRIPTS = geos-config
 LIBGEOS_CONF_OPTS = -DBUILD_BENCHMARKS=OFF
 
+LIBGEOS_CXXFLAGS = $(TARGET_CXXCFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+LIBGEOS_CXXFLAGS += -O0
+endif
+
 ifeq ($(BR2_arm)$(BR2_armeb),y)
 LIBGEOS_CONF_OPTS += -DDISABLE_GEOS_INLINE=ON
 endif
 
+LIBGEOS_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(LIBGEOS_CXXFLAGS)"
+
 $(eval $(cmake-package))
-- 
2.25.1

             reply	other threads:[~2021-02-12 22:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 22:42 Giulio Benetti [this message]
2021-02-13 21:51 ` [Buildroot] [PATCH] package/libgeos: fix build failure due to Gcc Bug 68485 Thomas Petazzoni
2021-02-14 23:46   ` Giulio Benetti
2021-02-15  8:58     ` Thomas Petazzoni
2021-02-15 19:27       ` Giulio Benetti

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=20210212224238.1938197-1-giulio.benetti@benettiengineering.com \
    --to=giulio.benetti@benettiengineering.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox