From e444b6326e3bb1942d9b51e0cdc6bf9350692910 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sun, 17 Sep 2017 17:25:57 -0400 Subject: Disable GCC code hoisting Set MLton to invoke GCC with -fno-code-hoisting when using C codegen. This corrects a miscompilation on arm64 and mips64el. See https://bugs.debian.org/871572 for details. --- debian/changelog | 6 ++++++ debian/rules | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3c79142b..68e5b9ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +urweb (20170720+dfsg-2) unstable; urgency=medium + + * Disable code hoisting when using MLton’s C codegen. (Closes: #871572) + + -- Benjamin Barenblat Sun, 17 Sep 2017 17:25:24 -0400 + urweb (20170720+dfsg-1.1) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/rules b/debian/rules index cd3f8296..a7ae92ed 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,10 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # Avoid overlinking and reduce library dependencies. export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +# Disable GCC code hoisting to work around either a GCC bug or a MLton bug on +# arm64 and mips64el. See https://bugs.debian.org/871572 for details. +export DEB_CFLAGS_MAINT_APPEND := -fno-code-hoisting + # Harden SML executables. export DEB_BUILD_MAINT_OPTIONS := hardening=+all export MLTONARGS := \ -- cgit v1.2.3