[Buildroot] [git commit] package/kmsxx: work around gcc bug 85180

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Jun 19 19:37:27 UTC 2019


commit: https://git.buildroot.net/buildroot/commit/?id=10fe80b909328698ab58f88a8291b1da26e87d3c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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 kmsxx 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/360/360f19645e76314048c75424bb4b64da91742f47/

Signed-off-by: Giulio Benetti <giulio.benetti at micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 package/kmsxx/kmsxx.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
index c664d52361..829beb1d68 100644
--- a/package/kmsxx/kmsxx.mk
+++ b/package/kmsxx/kmsxx.mk
@@ -12,6 +12,14 @@ KMSXX_INSTALL_STAGING = YES
 KMSXX_DEPENDENCIES = libdrm host-pkgconf
 KMSXX_CONF_OPTS = -DKMSXX_ENABLE_PYTHON=OFF
 
+KMSXX_CXXFLAGS = $(TARGET_CXXFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+KMSXX_CXXFLAGS += -O0
+endif
+
+KMSXX_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(KMSXX_CXXFLAGS)"
+
 ifeq ($(BR2_PACKAGE_KMSXX_INSTALL_TESTS),y)
 KMSXX_TESTS = \
 	fbtest kmsblank kmscapture \


More information about the buildroot mailing list