Hack broken rust target selection so it produces the right target on raspbian.
authorPeter Michael Green <plugwash@raspbian.org>
Thu, 20 Oct 2022 16:38:40 +0000 (17:38 +0100)
committerRaspbian forward porter <root@raspbian.org>
Thu, 20 Oct 2022 16:38:40 +0000 (17:38 +0100)
Gbp-Pq: Name raspbian-rust-triplet-hack.patch

build/moz.configure/rust.configure

index af34c4609d355470311556422e189f98dc019c19..93c3cf9873d9c83db9d8279e54811fee4b8316d8 100644 (file)
@@ -249,9 +249,14 @@ def rust_compiler(rustc_info, cargo_info, target):
 
 
 @depends(rustc, when=rust_compiler)
+@imports("sys")
+@imports(_from="__builtin__", _import='repr')
 @imports(_from="__builtin__", _import="ValueError")
 def rust_supported_targets(rustc):
+    #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 = check_cmd_output(rustc, "--print", "target-list").splitlines()
+    out.append("arm-unknown-linux-gnueabihf")
     data = {}
     for t in out:
         try: