All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/prboom: avoid using hardcoded optimization flags
@ 2019-06-06 13:03 Giulio Benetti
  2019-06-06 13:03 ` [Buildroot] [PATCH 2/2] package/prboom: work around gcc bug 85180 Giulio Benetti
  0 siblings, 1 reply; 2+ messages in thread
From: Giulio Benetti @ 2019-06-06 13:03 UTC (permalink / raw)
  To: buildroot

Package prboom builds using -O2 flag ignoring Buildroot settings, this
is due to the fact that -O2 is appended at the end of CFLAGS.

Remove -O2 from 'configure' file, this way CFLAGS will contain Buildroot
CFLAGS.

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

diff --git a/package/prboom/prboom.mk b/package/prboom/prboom.mk
index d370ae3fa5..6d9b55e9f6 100644
--- a/package/prboom/prboom.mk
+++ b/package/prboom/prboom.mk
@@ -11,6 +11,13 @@ PRBOOM_DEPENDENCIES = sdl sdl_net sdl_mixer
 PRBOOM_LICENSE = GPL-2.0+
 PRBOOM_LICENSE_FILES = COPYING
 
+# Remove imposed -O2 CFLAG to use TARGET_CFLAGS
+define PRBOOM_FIXUP_CONFIGURE
+	sed -i 's:-O2::g' $(@D)/configure
+endef
+
+PRBOOM_PRE_CONFIGURE_HOOKS += PRBOOM_FIXUP_CONFIGURE
+
 ifeq ($(BR2_PACKAGE_LIBPNG),y)
 PRBOOM_DEPENDENCIES += libpng
 endif
-- 
2.17.1

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

* [Buildroot] [PATCH 2/2] package/prboom: work around gcc bug 85180
  2019-06-06 13:03 [Buildroot] [PATCH 1/2] package/prboom: avoid using hardcoded optimization flags Giulio Benetti
@ 2019-06-06 13:03 ` Giulio Benetti
  0 siblings, 0 replies; 2+ messages in thread
From: Giulio Benetti @ 2019-06-06 13:03 UTC (permalink / raw)
  To: buildroot

With Microblaze Gcc version < 8.x the build hangs due to gcc bug
85180: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. The bug
shows up when building prboom with optimization but not when building
with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y we
force using -O0.

Fixes:
http://autobuild.buildroot.net/results/e72/e72a2070ab7e9a093c3c70002ee94ee57a6154f6/

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

diff --git a/package/prboom/prboom.mk b/package/prboom/prboom.mk
index 6d9b55e9f6..1ba8d968ab 100644
--- a/package/prboom/prboom.mk
+++ b/package/prboom/prboom.mk
@@ -18,6 +18,14 @@ endef
 
 PRBOOM_PRE_CONFIGURE_HOOKS += PRBOOM_FIXUP_CONFIGURE
 
+PRBOOM_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+PRBOOM_CFLAGS += -O0
+endif
+
+PRBOOM_CONF_ENV += CFLAGS="$(PRBOOM_CFLAGS)"
+
 ifeq ($(BR2_PACKAGE_LIBPNG),y)
 PRBOOM_DEPENDENCIES += libpng
 endif
-- 
2.17.1

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

end of thread, other threads:[~2019-06-06 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 13:03 [Buildroot] [PATCH 1/2] package/prboom: avoid using hardcoded optimization flags Giulio Benetti
2019-06-06 13:03 ` [Buildroot] [PATCH 2/2] package/prboom: work around gcc bug 85180 Giulio Benetti

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.