diff -Nru thunderbird-60.4.0/debian/changelog thunderbird-60.4.0/debian/changelog
--- thunderbird-60.4.0/debian/changelog	2018-12-24 16:04:10.000000000 +0000
+++ thunderbird-60.4.0/debian/changelog	2019-01-18 23:40:33.000000000 +0000
@@ -1,3 +1,16 @@
+thunderbird (1:60.4.0-1+rpi1) buster-staging; urgency=medium
+
+  [changes brought over from firefox-esr 60.3.0esr-1+rpi1 by Peter Michael Green <plugwash@raspbian.org> at Wed, 05 Dec 2018 06:56:52 +0000]
+  * Hack broken rust target selection so it produces the right target
+    on raspbian.
+  * Fix clean target.
+
+  [changes introduced in 60.4.0-1+rpi1 by Peter Michael Green]
+  * Further fixes to clean target (still not completely fixed :( ).
+  * Add build-depends on clang-6.0 (to match libclang-6.0-dev)
+
+ -- Peter Micheal Green <plugwash@raspbian.org>  Fri, 18 Jan 2019 23:40:33 +0000
+
 thunderbird (1:60.4.0-1) unstable; urgency=medium
 
   * [2e5a9d0] d/control: don't hard code LLVM packages in B-D
diff -Nru thunderbird-60.4.0/debian/control thunderbird-60.4.0/debian/control
--- thunderbird-60.4.0/debian/control	2018-12-24 15:58:31.000000000 +0000
+++ thunderbird-60.4.0/debian/control	2019-01-18 23:40:33.000000000 +0000
@@ -10,6 +10,7 @@
  bzip2,
  cargo (>= 0.20),
  clang,
+ clang-6.0,
  debhelper (>= 10.2.5~),
  dh-apparmor,
  dh-exec,
diff -Nru thunderbird-60.4.0/debian/patches/raspbian-rust-triplet-hack.patch thunderbird-60.4.0/debian/patches/raspbian-rust-triplet-hack.patch
--- thunderbird-60.4.0/debian/patches/raspbian-rust-triplet-hack.patch	1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-60.4.0/debian/patches/raspbian-rust-triplet-hack.patch	2019-01-18 23:29:11.000000000 +0000
@@ -0,0 +1,56 @@
+Description:  Hack broken rust target selection so it produces the right target on raspbian.
+Author: Peter Michael Green <plugwash@raspbian.org>
+
+Index: firefox-esr-60.3.0esr.new/build/moz.configure/rust.configure
+===================================================================
+--- firefox-esr-60.3.0esr.new.orig/build/moz.configure/rust.configure
++++ firefox-esr-60.3.0esr.new/build/moz.configure/rust.configure
+@@ -111,6 +111,8 @@ def rust_compiler(rustc_info, cargo_info
+ 
+ 
+ @depends(rustc, when=rust_compiler)
++@imports('sys')
++@imports(_from='__builtin__', _import='repr')
+ def rust_supported_targets(rustc):
+     out = check_cmd_output(rustc, '--print', 'target-list').splitlines()
+     # The os in the triplets used by rust may match the same OSes, in which
+@@ -118,9 +120,14 @@ def rust_supported_targets(rustc):
+     per_os = {}
+     ambiguous = set()
+     per_raw_os = {}
++    #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')
+     for t in out:
++        traw = t
+         t = split_triplet(t, allow_unknown=True)
+         key = (t.cpu, t.endianness, t.os)
++        sys.stdout.write(traw+' '+repr(key)+' '+repr(t.raw_os)+'\n')
+         if key in per_os:
+             previous = per_os[key]
+             per_raw_os[(previous.cpu, previous.endianness,
+@@ -152,11 +159,13 @@ def rust_triple_alias(host_or_target):
+     @depends(rustc, host_or_target, c_compiler, rust_supported_targets,
+              when=rust_compiler)
+     @imports('os')
++    @imports('sys')
+     @imports('subprocess')
+     @imports(_from='mozbuild.configure.util', _import='LineIO')
+     @imports(_from='mozbuild.shellutil', _import='quote')
+     @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):
+         # Rust's --target options are similar to, but not exactly the same
+@@ -180,8 +189,9 @@ def rust_triple_alias(host_or_target):
+ 
+         rustc_target = rust_supported_targets.per_os.get(
+             (host_or_target.cpu, host_or_target.endianness, host_or_target_os))
+-
++        #sys.stdout.write(host_or_target.cpu+'\n')
+         if rustc_target is None:
++            sys.stdout.write('using per_raw_os.get with tuple '+repr(((host_or_target.cpu, host_or_target.endianness,host_or_target_raw_os)))+'\n')
+             rustc_target = rust_supported_targets.per_raw_os.get(
+                 (host_or_target.cpu, host_or_target.endianness,
+                  host_or_target_raw_os))
diff -Nru thunderbird-60.4.0/debian/patches/series thunderbird-60.4.0/debian/patches/series
--- thunderbird-60.4.0/debian/patches/series	2018-12-21 15:07:29.000000000 +0000
+++ thunderbird-60.4.0/debian/patches/series	2019-01-18 23:30:47.000000000 +0000
@@ -37,3 +37,4 @@
 porting-armel/Avoid-using-vmrs-vmsr-on-armel.patch
 porting-mips/Bug-1444303-MIPS-Fix-build-failures-after-Bug-1425580-par.patch
 porting-mips/Bug-1444834-MIPS-Stubout-MacroAssembler-speculationBarrie.patch
+raspbian-rust-triplet-hack.patch
diff -Nru thunderbird-60.4.0/debian/rules thunderbird-60.4.0/debian/rules
--- thunderbird-60.4.0/debian/rules	2018-11-25 07:40:46.000000000 +0000
+++ thunderbird-60.4.0/debian/rules	2019-01-18 23:40:33.000000000 +0000
@@ -76,6 +76,17 @@
 	dh_auto_clean --builddirectory=obj-thunderbird
 	# needed for thunderbird-l10n
 	rm -rf $(THUNDERBIRD_L10N_BUILDDIR)
+	find third_party/python/psutil/tmp/ ! -name 'tmpoJXh06.o' -type f -exec rm -f {} +
+	rm -f third_party/python/psutil/psutil/*.so
+	rm -rf third_party/python/psutil/build/temp*
+	rm -rf third_party/python/psutil/build/lib*
+	find . -name '*.pyc' -delete
+	rm -f mozconfig.*
+	#building seems to result in stripping comments out of the configure stubs,
+	#but the .in files seem to match what is in the source tarball, so copy them over
+	cp configure.in configure
+	cp js/src/configure.in js/src/configure
+	rm -f js/src/old-configure
 
 override_dh_auto_configure:
 	# run autoconf for all configure files