From ebe362b11fcc923e1b8663e18b66972bb1e56b71 Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Thu, 9 Dec 2021 19:50:39 +0000 Subject: [PATCH] update raspbian-rust-triplet-hack.patch --- .../patches/raspbian-rust-triplet-hack.patch | 33 ++++++------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/debian/patches/raspbian-rust-triplet-hack.patch b/debian/patches/raspbian-rust-triplet-hack.patch index 95dee0d99f9..c406672d9b6 100644 --- a/debian/patches/raspbian-rust-triplet-hack.patch +++ b/debian/patches/raspbian-rust-triplet-hack.patch @@ -1,33 +1,20 @@ Description: Hack broken rust target selection so it produces the right target on raspbian. Author: Peter Michael Green ---- firefox-esr-78.3.0esr.orig/build/moz.configure/rust.configure -+++ firefox-esr-78.3.0esr/build/moz.configure/rust.configure -@@ -192,9 +192,14 @@ def rust_compiler(rustc_info, cargo_info +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index 40f017da67..8dbbace178 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -236,8 +236,13 @@ def rust_compiler(rustc_info, cargo_info): @depends(rustc, when=rust_compiler) -+@imports('sys') -+@imports(_from='__builtin__', _import='repr') - @imports(_from='__builtin__', _import='ValueError') ++@imports("sys") ++@imports(_from="__builtin__", _import='repr') + @imports(_from="__builtin__", _import="ValueError") def rust_supported_targets(rustc): - out = check_cmd_output(rustc, '--print', 'target-list').splitlines() + #HACK: if there are multiple matches the algorithm uses the last one + #put arm-unknown-linux-gnuebihf on the end of the list so it gets preffered -+ out.append('arm-unknown-linux-gnueabihf') ++ out.append("arm-unknown-linux-gnueabihf") + out = check_cmd_output(rustc, "--print", "target-list").splitlines() data = {} for t in out: - try: -@@ -232,11 +237,13 @@ def rust_triple_alias(host_or_target, ho - rust_supported_targets, arm_target, when=rust_compiler) - @checking('for rust %s triplet' % host_or_target_str) - @imports('os') -+ @imports('sys') - @imports(_from='mozbuild.configure.util', _import='LineIO') - @imports(_from='mozbuild.shellutil', _import='quote') - @imports(_from='six', _import='ensure_binary') - @imports(_from='tempfile', _import='mkstemp') - @imports(_from='textwrap', _import='dedent') -+ @imports(_from='__builtin__', _import='repr') - def rust_target(rustc, host_or_target, compiler_info, - rust_supported_targets, arm_target): - # Rust's --target options are similar to, but not exactly the same -- 2.30.2