XPost: linux.debian.ports.68k, linux.debian.maint.x
retitle 1067207 mesa: [m68k] switch statement too large, needs -mlong-jump-table-offsets
tags 1067207 + patch
thanks
Adding the -mlong-jump-table-offsets flag to CFLAGS on m68k should
That did it. I built with…
APPEND CFLAGS -mlong-jump-table-offsets
APPEND CXXFLAGS -mlong-jump-table-offsets
… in /etc/dpkg/buildflags.conf in the chroot. An equivalent patch
for d/rules would be:
--- debian/rules~ 2024-04-01 23:29:11.000000000 +0200
+++ debian/rules 2024-04-01 23:31:39.379936168 +0200
@@ -18,7 +18,11 @@
export DEB_BUILD_MAINT_OPTIONS=optimize=-lto
-ifeq (,$(filter $(DEB_HOST_ARCH), armhf ppc64el sh3 sh4))
+ifneq (,$(filter $(DEB_HOST_ARCH), m68k))
+# This library has huge jump tables: Debian #1067207
+buildflags = \
+ $(shell DEB_CFLAGS_MAINT_APPEND='-Wall -mlong-jump-table-offsets' DEB_CXXFLAGS_MAINT_APPEND='-Wall -mlong-jump-table-offsets' dpkg-buildflags --export=configure)
+else ifeq (,$(filter $(DEB_HOST_ARCH), armhf ppc64el sh3 sh4))
buildflags = \
$(shell DEB_CFLAGS_MAINT_APPEND=-Wall DEB_CXXFLAGS_MAINT_APPEND=-Wall dpkg-buildflags --export=configure)
else
While there, you might want to consider changing these
nested ifs to the new gmake else-if model or perhaps
sorting it, or even changing to something like:
--- debian/rules~ 2024-04-01 23:29:11.000000000 +0200
+++ debian/rules 2024-04-01 23:36:10.368947470 +0200
@@ -18,20 +18,25 @@
export D