Source: mesa
Version: 17.3.2-1
Severity: normal
Tags: patch
User: debian-sup...@lists.debian.org
Usertags: sh3 sh4

Hello!

mesa currently FTBFS on sh4 (and consequently sh3) due to a bug
in upstream gcc which hasn't been resolved yet [1].

To work around this bug, it's enough to add "-O1" to the extra
C/C++ build flags on sh3/sh4 which sets

      "-freorder-blocks-algorithm=simple"

Just passing "-freorder-blocks-algorithm=simple" doesn't unfor-
tunately work as gcc would just crash the qemu buildd. This
might be a bug in qemu. For the time being, we will be happy
with just passing "-O1" to fix the FTBFS.

Patch attached.

Thanks,
Adrian

> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
diff -Nru old/mesa-17.3.2/debian/rules new/mesa-17.3.2/debian/rules
--- old/mesa-17.3.2/debian/rules        2018-01-16 16:00:16.000000000 +0100
+++ new/mesa-17.3.2/debian/rules        2018-01-16 16:50:14.789910395 +0100
@@ -10,13 +10,19 @@
 DEB_HOST_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 
-ifeq (,$(filter $(DEB_HOST_ARCH), armhf))
+ifeq (,$(filter $(DEB_HOST_ARCH), armhf sh3 sh4))
 buildflags = \
        $(shell DEB_CFLAGS_MAINT_APPEND=-Wall DEB_CXXFLAGS_MAINT_APPEND=-Wall 
dpkg-buildflags --export=configure)
 else
-# Workaround for a variant of LP: #725126
-buildflags = \
+  ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
+  # Workaround for a variant of LP: #725126
+  buildflags = \
        $(shell DEB_CFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" 
DEB_CXXFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" dpkg-buildflags 
--export=configure)
+  else
+  # Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143
+  buildflags = \
+       $(shell DEB_CFLAGS_MAINT_APPEND="-Wall -O1" 
DEB_CXXFLAGS_MAINT_APPEND="-Wall -O1" dpkg-buildflags --export=configure)
+  endif
 endif
 
 # keep a list of files we don't install (yet), but since it's a bit

Reply via email to