$ git show 8f89b90f1054
commit 8f89b90f1054645f7f92d985bc747410123c38c2
Author: Carsten Schoenert <c.schoenert@t-online.de>
Date: Fri Nov 1 20:22:27 2019 +0100
d/control: decrease build architecture list
Thunderbird is by the requirement of the availability of the packages
nodejs and cargo on a lot of archictures not buildable anymore. Thus
some possible RC platforms and also some platforms of the ports are
removed for now.
Also the platforms arm{el,hf} and mipsel make building quite hard due
the constraints of available and adressable memmory quite nearly
impossible.
The maintainers are currently not able to keep track of the required
tweaks and workarounds to keep Thunderbird buildable on those platforms.
The usability of Thunderbird is sometimes even not possible on these
platforms too. So in the end we don't have enough energy and time to get
Thunderbird still supported to build on the above 4 architectures.
The removement of all now non supported architectures don't need to be
done for all times. But maintaining the removed build architectures
requires times and mostly patches tot the source and also modifications
to the build system.
Some architectures are easily to get turn on again once people can
contribute these modifications!
Closes: #921258
diff --git a/debian/control b/debian/control
index f25fe1f3e66..93cbaafbf5e 100644
--- a/debian/control
+++ b/debian/control
@@ -68,7 +68,7 @@ X-Debian-Homepage: http://wiki.debian.org/Thunderbird
Standards-Version: 4.4.1
Package: thunderbird
-Architecture: any
+Architecture: amd64 arm64 i386 mips64el ppc64el s390x ppc64
Depends:
debianutils (>= 1.16),
fontconfig,
$ git show 3d58cc1981e5ca14f469b9cbeed45ae62f6d6e54
commit 3d58cc1981e5ca14f469b9cbeed45ae62f6d6e54
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Wed Oct 21 13:22:53 2020 +0200
d/control: reenable the armhf build on buster
Thunderbird was built on armhf on buster in the past, so there are old
binaries there. Let's try to get it built again, which would be better
than having old, unsupported binaries there.
diff --git a/debian/control b/debian/control
index 8f6256fe546..03f95b67fbb 100644
--- a/debian/control
+++ b/debian/control
@@ -61,7 +61,7 @@ X-Debian-Homepage: http://wiki.debian.org/Thunderbird
Standards-Version: 4.5.0
Package: thunderbird
-Architecture: amd64 arm64 i386 mips64el ppc64el s390x ppc64
+Architecture: amd64 arm64 armhf i386 mips64el ppc64el s390x ppc64
Depends:
debianutils (>= 1.16),
fontconfig,
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Thu Oct 20 11:00:35 2022 +0200
Re-enable armhf support
We used to support it in buster, and still have an old binary, so it'd
be better to have a current one with security support. So try to make
it build as we have done with firefox-esr.
diff --git a/debian/control b/debian/control
index a74bd40e514..0067d45be7b 100644
--- a/debian/control
+++ b/debian/control
@@ -57,7 +57,7 @@ X-Debian-Homepage: http://wiki.debian.org/Thunderbird
Standards-Version: 4.6.1
Package: thunderbird
-Architecture: amd64 arm64 i386 mips64el ppc64el s390x ppc64
+Architecture: amd64 armhf arm64 i386 mips64el ppc64el s390x ppc64
Depends:
debianutils (>= 1.16),
fontconfig,
diff --git a/debian/patches/debian-hacks/Allow-to-override-rust-LTO-flag.patch b/debian/patches/debian-hacks/Allow-to-override-rust-LTO-flag.patch
new file mode 100644
index 00000000000..c6d0f78c2a6
--- /dev/null
+++ b/debian/patches/debian-hacks/Allow-to-override-rust-LTO-flag.patch
@@ -0,0 +1,31 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sun, 14 Aug 2022 15:05:23 +0900
+Subject: Allow to override rust LTO flag
+
+---
+ config/makefiles/rust.mk | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
+index a243ee5..5a97613 100644
+--- a/config/makefiles/rust.mk
++++ b/config/makefiles/rust.mk
+@@ -90,8 +90,9 @@ ifndef rustflags_sancov
+ # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
+ ifndef MOZ_CODE_COVERAGE
+ ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
+-cargo_rustc_flags += -Clto
++cargo_rustc_flags += $(or $(DEBIAN_RUST_LTO),-Clto)
+ endif
++ifneq (-Clto=off,$(DEBIAN_RUST_LTO))
+ # We need -Cembed-bitcode=yes for all crates when using -Clto.
+ RUSTFLAGS += -Cembed-bitcode=yes
+ endif
+@@ -99,6 +100,7 @@ endif
+ endif
+ endif
+ endif
++endif
+
+ ifdef CARGO_INCREMENTAL
+ export CARGO_INCREMENTAL
diff --git a/debian/patches/series b/debian/patches/series
index 2701723a55e..cafa394d293 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -27,3 +27,4 @@ porting-ppc64el/work-around-a-build-failure-with-clang-on-ppc64el.patch
debian-hacks/Make-Thunderbird-build-reproducible.patch
debian-hacks/Decrease-Cargo-minimal-version-to-1.46.0.patch
debian-hacks/Fix-Floating-Point-Normalization-breakage-on-32bit-Linux.patch
+debian-hacks/Allow-to-override-rust-LTO-flag.patch
diff --git a/debian/rules b/debian/rules
index dd993cdc7cf..a307586904d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -43,6 +43,11 @@ ifeq ($(DEB_BUILD_ARCH),armel)
LDFLAGS += -Wl,-z,muldefs
endif
+# Use thinLTO on armhf, to stay in the memory budget with an armhf toolchain.
+ifeq (armhf,$(DEB_BUILD_ARCH))
+export DEBIAN_RUST_LTO=-Clto=thin
+endif
+
# Reduce memory usage of the linker at the expense of processing time
# This should help on lower-end architectures like arm and mips, which
# spend an immense amount of time swapping.
@@ -96,6 +101,12 @@ override_dh_auto_clean:
rm -rf $(MOZBUILD_STATE_PATH)
override_dh_auto_configure:
+ifeq (armhf,$(DEB_BUILD_ARCH))
+ifeq (,$(shell grep -l cpu:type:aarch64 /sys/devices/system/cpu/modalias))
+ # There is not enough memory in armhf userspace with a 32-bits kernel.
+ $(error Unfortunately cannot build on armhf. Try a 64-bits kernel)
+endif
+endif
# run autoconf for all configure files
if [ "Z$(DEB_AUTO_UPDATE_AUTOCONF)" != Z ] || [ ! -e $(CURDIR)/configure ]; then \
cd $(CURDIR) && `which autoconf$(DEB_AUTO_UPDATE_AUTOCONF) || which autoconf`; fi