diff --git a/debian/rules b/debian/rules index f6aabc91f28c0be65bdf741d7964c7acaec18d15..39fe1c50a0f9729a2d2533cb10f11c012191f494 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,13 @@ ifeq (${DEB_HOST_MULTIARCH},) $(foreach d, $(shell dpkg-architecture | sed 's/=/?=/'), $(eval export $d)) endif +# Disable LTO on non-amd64 builds, see: +# https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1921664 +# https://bugzilla.redhat.com/show_bug.cgi?id=1952483 +ifneq ($(DEB_HOST_ARCH),amd64) + export DEB_BUILD_MAINT_OPTIONS += optimize=-lto +endif + ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) VENDOR := UBUNTU DEB_BUILD_PARALLEL = yes