[1/2] package/prboom: avoid using hardcoded optimization flags
diff mbox series

Message ID 20190606130304.129551-1-giulio.benetti@micronovasrl.com
State Superseded
Headers show
Series
  • [1/2] package/prboom: avoid using hardcoded optimization flags
Related show

Commit Message

Giulio Benetti June 6, 2019, 1:03 p.m. UTC
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(+)

Patch
diff mbox series

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