From 19b13fcc699e65bc73e8496cf65b560dcd43e315 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Thu, 14 Oct 2021 00:36:00 +0100 Subject: [PATCH] Fix build failures for ppc64el and armhf --- debian/changelog | 7 +++++++ debian/patches/series | 1 + debian/patches/u-cc-627.patch | 16 ++++++++++++++++ debian/rules | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 debian/patches/u-cc-627.patch diff --git a/debian/changelog b/debian/changelog index 1bdaed6879..03d9d9387d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +rustc (1.55.0+dfsg1-2) UNRELEASED; urgency=medium + + * Actually work around segfault on ppc64el. + * Fix FTBFS on armhf caused by GCC 11 changes. + + -- Ximin Luo Wed, 13 Oct 2021 23:46:57 +0100 + rustc (1.55.0+dfsg1-1) unstable; urgency=medium * Upload to unstable. diff --git a/debian/patches/series b/debian/patches/series index 0448287568..bde75ac5f5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,6 +7,7 @@ u-85807.patch 0001-Revert-Auto-merge-of-79547.patch u-reproducible-build.patch u-ignore-endian-big-diff.patch +u-cc-627.patch # not forwarded, or forwarded but unlikely to be merged u-ignore-ppc-hangs.patch diff --git a/debian/patches/u-cc-627.patch b/debian/patches/u-cc-627.patch new file mode 100644 index 0000000000..983d6d611b --- /dev/null +++ b/debian/patches/u-cc-627.patch @@ -0,0 +1,16 @@ +Forwarded: https://github.com/alexcrichton/cc-rs/pull/627 + +--- a/vendor/cc/src/lib.rs ++++ b/vendor/cc/src/lib.rs +@@ -1559,6 +1559,11 @@ + && target.contains("-linux-") + { + cmd.args.push("-march=armv7-a".into()); ++ ++ if target.ends_with("eabihf") { ++ // lowest common denominator FPU ++ cmd.args.push("-mfpu=vfpv3-d16".into()); ++ } + } + + // (x86 Android doesn't say "eabi") diff --git a/debian/rules b/debian/rules index e14198dbdf..756e6fa28c 100755 --- a/debian/rules +++ b/debian/rules @@ -53,7 +53,7 @@ RUSTBUILD_TEST_FLAGS = # https://github.com/rust-lang/rust/issues/89744 # TODO: remove when we update cargo to 1.55 / 0.56 # upstream bug still exists and is under investigation, but is hidden by newer cargo -export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL=3 +export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL=0 update-version: oldver=$(shell $(SED_RUSTC_BUILDDEP) | sed -ne 's/.*(<= \(.*\)).*/\1/gp' | $(SED_VERSION_SHORT)); \