Github messages for voidlinux
 help / color / Atom feed
* [PR PATCH] rust: update to 1.39.0, cargo: update to 0.40.0
@ 2019-11-08 20:03 voidlinux-github
  2019-11-08 23:53 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: voidlinux-github @ 2019-11-08 20:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages rust139
https://github.com/void-linux/void-packages/pull/16243

rust: update to 1.39.0, cargo: update to 0.40.0
This also switches to LLVM9.

Generally seems to work fine except Firefox fails to build now. Fix is probably to be done in Firefox. Some generated code from `style` fails to compile, with errors like

```
19:20.28 error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `gecko_bindings::structs::root::mozilla::GeckoBackground`:
```

As the generated file is one line, it spams the console really badly, but turns out that is not a new issue, so we can probably ignore that, as long as FF can get fixed.

A patch file from https://github.com/void-linux/void-packages/pull/16243.patch is attached

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-rust139-16243.patch --]
[-- Type: text/x-diff, Size: 35045 bytes --]

From 0439a1358223fb39e12b39429e0b8c6a01bc8d72 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 3 Nov 2019 18:55:56 +0100
Subject: [PATCH 1/4] rust: update to 1.39.0

This also switches to LLVM9.
---
 ...ative-libraries-when-linking-static-.patch | 15 ++--
 ...dlib-and-musl_root-from-musl-targets.patch | 85 +++++++------------
 ...er-libgcc_eh-over-libunwind-for-musl.patch | 43 +++++++++-
 ...piletest-Match-suffixed-environments.patch | 48 -----------
 ...c-variadic-Fix-patterns-on-powerpc64.patch | 73 ----------------
 ...-stage-2-tools-dynamically-to-libstd.patch | 41 ++++-----
 srcpkgs/rust/patches/0091-bootstrap.patch     | 71 ----------------
 srcpkgs/rust/patches/0099-set-piclevel.patch  | 56 ++++++++++++
 srcpkgs/rust/template                         |  9 +-
 9 files changed, 154 insertions(+), 287 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
 delete mode 100644 srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
 delete mode 100644 srcpkgs/rust/patches/0091-bootstrap.patch
 create mode 100644 srcpkgs/rust/patches/0099-set-piclevel.patch

diff --git a/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
index 854cd61e68e..74e9e1e1b1d 100644
--- a/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
@@ -19,7 +19,7 @@ diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/ba
 index e3d297e7862..974e8c0239b 100644
 --- a/src/librustc_codegen_ssa/back/link.rs
 +++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1571,9 +1571,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
+@@ -1602,9 +1602,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
      }
  }
  
@@ -30,11 +30,11 @@ index e3d297e7862..974e8c0239b 100644
  //
  // 1. The upstream crate is an rlib. In this case we *must* link in the
  // native dependency because the rlib is just an archive.
-@@ -1616,7 +1614,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
+@@ -1647,7 +1645,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
                  continue
              }
              match lib.kind {
--                NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
+-                NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
 +                NativeLibraryKind::NativeUnknown => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
@@ -43,14 +43,11 @@ index e3d297e7862..974e8c0239b 100644
 +                        && sess.crt_static()
 +                        && !sess.target.target.options.crt_static_allows_dylibs
 +                    {
-+                        cmd.link_staticlib(&name.as_str())
++                        cmd.link_staticlib(name)
 +                    } else {
-+                        cmd.link_dylib(&name.as_str())
++                        cmd.link_dylib(name)
 +                    }
 +                },
-                 NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
+                 NativeLibraryKind::NativeFramework => cmd.link_framework(name),
                  NativeLibraryKind::NativeStaticNobundle => {
                      // Link "static-nobundle" native libs only if the crate they originate from
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 88e05b3887d..af7ed0b86c6 100644
--- a/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,3 +1,5 @@
+Updated from:
+
 From e8ef432c23ea9fb70b28bea07042b33f1050569b Mon Sep 17 00:00:00 2001
 From: Samuel Holland <samuel@sholland.org>
 Date: Fri, 8 Sep 2017 22:11:14 -0500
@@ -20,10 +22,10 @@ Subject: [PATCH 05/16] Remove -nostdlib and musl_root from musl targets
  13 files changed, 4 insertions(+), 152 deletions(-)
 
 diff --git a/config.toml.example b/config.toml.example
-index c14adf8ce33..8ec8d2bbbb7 100644
+index 848147c2..2aea23d4 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -479,12 +479,6 @@
+@@ -469,12 +469,6 @@
  # only use static libraries. If unset, the target's default linkage is used.
  #crt-static = false
  
@@ -36,32 +38,11 @@ index c14adf8ce33..8ec8d2bbbb7 100644
  # The root location of the `wasm32-wasi` sysroot.
  #wasi-root = "..."
  
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index 595deb07ec8..c077dc1581e 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -145,16 +145,6 @@ fn main() {
-             cmd.arg("-Cprefer-dynamic");
-         }
- 
--        // Help the libc crate compile by assisting it in finding various
--        // sysroot native libraries.
--        if let Some(s) = env::var_os("MUSL_ROOT") {
--            if target.contains("musl") {
--                let mut root = OsString::from("native=");
--                root.push(&s);
--                root.push("/lib");
--                cmd.arg("-L").arg(&root);
--            }
--        }
-         if let Some(s) = env::var_os("WASI_ROOT") {
-             let mut root = OsString::from("native=");
-             root.push(&s);
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 400375cd201..0394ab7a8a7 100644
+index a4cb81d3..b4247e74 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -84,7 +84,7 @@ pub fn find(build: &mut Build) {
+@@ -86,7 +86,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -70,7 +51,7 @@ index 400375cd201..0394ab7a8a7 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -107,7 +107,7 @@ pub fn find(build: &mut Build) {
+@@ -109,7 +109,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -79,7 +60,7 @@ index 400375cd201..0394ab7a8a7 100644
              true
          } else {
              false
-@@ -134,8 +134,7 @@ pub fn find(build: &mut Build) {
+@@ -136,8 +136,7 @@ pub fn find(build: &mut Build) {
  fn set_compiler(cfg: &mut cc::Build,
                  compiler: Language,
                  target: Interned<String>,
@@ -89,7 +70,7 @@ index 400375cd201..0394ab7a8a7 100644
      match &*target {
          // When compiling for android we may have the NDK configured in the
          // config.toml in which case we look there. Otherwise the default
-@@ -175,26 +174,6 @@ fn set_compiler(cfg: &mut cc::Build,
+@@ -177,26 +176,6 @@ fn set_compiler(cfg: &mut cc::Build,
              }
          }
  
@@ -117,7 +98,7 @@ index 400375cd201..0394ab7a8a7 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 576267e6948..8e5de3907f6 100644
+index 6ea32edf..afdf6fcf 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
 @@ -116,20 +116,7 @@ impl Step for Std {
@@ -142,24 +123,27 @@ index 576267e6948..8e5de3907f6 100644
          for &obj in &["crt1.o"] {
              builder.copy(
                  &builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj),
-@@ -219,12 +206,6 @@ pub fn std_cargo(builder: &Builder<'_>,
+@@ -220,15 +207,6 @@ pub fn std_cargo(builder: &Builder<'_>,
              .arg("--manifest-path")
-             .arg(builder.src.join("src/libstd/Cargo.toml"));
+             .arg(builder.src.join("src/libtest/Cargo.toml"));
  
+-        // Help the libc crate compile by assisting it in finding various
+-        // sysroot native libraries.
 -        if target.contains("musl") {
 -            if let Some(p) = builder.musl_root(target) {
--                cargo.env("MUSL_ROOT", p);
+-                let root = format!("native={}/lib", p.to_str().unwrap());
+-                cargo.rustflag("-L").rustflag(&root);
 -            }
 -        }
 -
          if target.ends_with("-wasi") {
              if let Some(p) = builder.wasi_root(target) {
-                 cargo.env("WASI_ROOT", p);
+                 let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 66f504ea924..5bb211501b1 100644
+index 52b5cd88..cc191271 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -133,8 +133,6 @@ pub struct Config {
+@@ -131,8 +131,6 @@ pub struct Config {
      pub print_step_timings: bool,
      pub missing_tools: bool,
  
@@ -168,7 +152,7 @@ index 66f504ea924..5bb211501b1 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -169,7 +167,6 @@ pub struct Target {
+@@ -167,7 +165,6 @@ pub struct Target {
      pub linker: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub crt_static: Option<bool>,
@@ -176,7 +160,7 @@ index 66f504ea924..5bb211501b1 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -307,7 +304,6 @@ struct Rust {
+@@ -305,7 +302,6 @@ struct Rust {
      backtrace: Option<bool>,
      default_linker: Option<String>,
      channel: Option<String>,
@@ -184,7 +168,7 @@ index 66f504ea924..5bb211501b1 100644
      rpath: Option<bool>,
      optimize_tests: Option<bool>,
      codegen_tests: Option<bool>,
-@@ -346,7 +342,6 @@ struct TomlTarget {
+@@ -342,7 +338,6 @@ struct TomlTarget {
      linker: Option<String>,
      android_ndk: Option<String>,
      crt_static: Option<bool>,
@@ -192,15 +176,15 @@ index 66f504ea924..5bb211501b1 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
  }
-@@ -569,7 +564,6 @@ impl Config {
+@@ -562,7 +557,6 @@ impl Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker.clone();
 -            config.musl_root = rust.musl_root.clone().map(PathBuf::from);
              config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
-             set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
+             set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -607,7 +601,6 @@ impl Config {
+@@ -600,7 +594,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
                  target.linker = cfg.linker.clone().map(PathBuf::from);
                  target.crt_static = cfg.crt_static.clone();
@@ -209,7 +193,7 @@ index 66f504ea924..5bb211501b1 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
  
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 907983d43ad..e91f6fcbe4b 100755
+index 346f0cb2..80409781 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -110,30 +110,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -244,10 +228,10 @@ index 907983d43ad..e91f6fcbe4b 100755
    "rootfs in qemu testing, you probably don't want to use this")
  v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 867df81d972..4fb57aa6db6 100644
+index d292609f..ff5f7e16 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -847,14 +847,6 @@ impl Build {
+@@ -835,14 +835,6 @@ impl Build {
          }
      }
  
@@ -263,10 +247,10 @@ index 867df81d972..4fb57aa6db6 100644
      fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
          self.config.target_config.get(&target)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index dc65fb9b797..060ba6d9e42 100644
+index bffe748f..3b109548 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -176,34 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -187,30 +187,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -285,10 +269,6 @@ index dc65fb9b797..060ba6d9e42 100644
 -                        panic!("couldn't find libc.a in musl dir: {}",
 -                               root.join("lib").display());
 -                    }
--                    if fs::metadata(root.join("lib/libunwind.a")).is_err() {
--                        panic!("couldn't find libunwind.a in musl dir: {}",
--                               root.join("lib").display());
--                    }
 -                }
 -                None => {
 -                    panic!("when targeting MUSL either the rust.musl-root \
@@ -302,7 +282,7 @@ index dc65fb9b797..060ba6d9e42 100644
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
 diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index e294e63982d..58ae91a96aa 100644
+index 17fecb3b..18732066 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
 @@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
@@ -334,6 +314,3 @@ index e294e63982d..58ae91a96aa 100644
      // These targets statically link libc by default
      base.crt_static_default = true;
      // These targets allow the user to choose between static and dynamic linking.
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
index 2f109444886..d32841103a1 100644
--- a/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ b/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -1,3 +1,5 @@
+Additions for build.rs by q66, necessary for our musl setup.
+
 From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001
 From: Samuel Holland <samuel@sholland.org>
 Date: Sat, 9 Sep 2017 00:14:16 -0500
@@ -19,6 +21,41 @@ index 9182e349b19..0377fbb58fc 100644
 +#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
  #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
  extern {}
--- 
-2.21.0
-
+diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
+index f24d957..28828e5 100644
+--- a/src/libunwind/build.rs
++++ b/src/libunwind/build.rs
+@@ -5,15 +5,11 @@ fn main() {
+     let target = env::var("TARGET").expect("TARGET was not set");
+ 
+     if cfg!(feature = "llvm-libunwind") &&
+-        ((target.contains("linux") && !target.contains("musl")) ||
+-         target.contains("fuchsia")) {
++        (target.contains("linux") || target.contains("fuchsia")) {
+         // Build the unwinding from libunwind C/C++ source code.
+         llvm_libunwind::compile();
+     } else if target.contains("linux") {
+-        if target.contains("musl") {
+-            // linking for musl is handled in lib.rs
+-            llvm_libunwind::compile();
+-        } else if !target.contains("android") {
++        if !target.contains("android") {
+             println!("cargo:rustc-link-lib=gcc_s");
+         }
+     } else if target.contains("freebsd") {
+@@ -99,15 +95,6 @@ mod llvm_libunwind {
+             cfg.file(root.join("src").join(src));
+         }
+ 
+-        if target_env == "musl" {
+-            // use the same C compiler command to compile C++ code so we do not need to setup the
+-            // C++ compiler env variables on the builders
+-            cfg.cpp(false);
+-            // linking for musl is handled in lib.rs
+-            cfg.cargo_metadata(false);
+-            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
+-        }
+-
+         cfg.compile("unwind");
+     }
+ }
diff --git a/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch b/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
deleted file mode 100644
index 9ca4d99000c..00000000000
--- a/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0b28aa018f3f64913101495ce9806d356230856e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:10:10 -0500
-Subject: [PATCH 09/16] compiletest: Match suffixed environments
-
----
- src/tools/compiletest/src/header.rs | 2 +-
- src/tools/compiletest/src/util.rs   | 8 ++++++--
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
-index 52f777db2da..4bf3c1a8527 100644
---- a/src/tools/compiletest/src/header.rs
-+++ b/src/tools/compiletest/src/header.rs
-@@ -820,10 +820,10 @@ impl Config {
- 
-             if name == "test" ||
-                 util::matches_os(&self.target, name) ||             // target
-+                util::matches_env(&self.target, name) ||            // env
-                 name == util::get_arch(&self.target) ||             // architecture
-                 name == util::get_pointer_width(&self.target) ||    // pointer width
-                 name == self.stage_id.split('-').next().unwrap() || // stage
--                Some(name) == util::get_env(&self.target) ||        // env
-                 (self.target != self.host && name == "cross-compile") ||
-                 match self.compare_mode {
-                     Some(CompareMode::Nll) => name == "compare-mode-nll",
-diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 8caf5ca00f5..d23f4edc55d 100644
---- a/src/tools/compiletest/src/util.rs
-+++ b/src/tools/compiletest/src/util.rs
-@@ -101,8 +101,12 @@ pub fn get_arch(triple: &str) -> &'static str {
-     panic!("Cannot determine Architecture from triple");
- }
- 
--pub fn get_env(triple: &str) -> Option<&str> {
--    triple.split('-').nth(3)
-+pub fn matches_env(triple: &str, name: &str) -> bool {
-+    if let Some(env) = triple.split('-').nth(3) {
-+        env.starts_with(name)
-+    } else {
-+        false
-+    }
- }
- 
- pub fn get_pointer_width(triple: &str) -> &'static str {
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch b/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
deleted file mode 100644
index 2e2111edbbc..00000000000
--- a/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From e6a01c436377109808cac2d49ec30968a02b561d Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:09:15 -0500
-Subject: [PATCH 10/16] test/c-variadic: Fix patterns on powerpc64
-
----
- src/test/codegen/c-variadic.rs | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/src/test/codegen/c-variadic.rs b/src/test/codegen/c-variadic.rs
-index bb90a9653f5..6ef77ca483f 100644
---- a/src/test/codegen/c-variadic.rs
-+++ b/src/test/codegen/c-variadic.rs
-@@ -14,13 +14,13 @@ extern "C" {
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_0() {
-     // Ensure that we correctly call foreign C-variadic functions.
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM:i32( signext)?]] 0)
-     foreign_c_variadic_0(0);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42)
-     foreign_c_variadic_0(0, 42i32);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
-     foreign_c_variadic_0(0, 42i32, 1024i32);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
-     foreign_c_variadic_0(0, 42i32, 1024i32, 0i32);
- }
- 
-@@ -34,18 +34,18 @@ pub unsafe extern "C" fn use_foreign_c_variadic_1_0(ap: VaList) {
- 
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_1(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 42)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 42)
-     foreign_c_variadic_1(ap, 42i32);
- }
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_2(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42)
-     foreign_c_variadic_1(ap, 2i32, 42i32);
- }
- 
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_3(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42, i32 0)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42, [[PARAM]] 0)
-     foreign_c_variadic_1(ap, 2i32, 42i32, 0i32);
- }
- 
-@@ -64,12 +64,12 @@ pub unsafe extern "C" fn c_variadic(n: i32, mut ap: ...) -> i32 {
- // Ensure that we generate the correct `call` signature when calling a Rust
- // defined C-variadic.
- pub unsafe fn test_c_variadic_call() {
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0)
-+    // CHECK: call [[RET:(signext )?i32]] (i32, ...) @c_variadic([[PARAM]] 0)
-     c_variadic(0);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42)
-     c_variadic(0, 42i32);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
-     c_variadic(0, 42i32, 1024i32);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024, i32 0)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
-     c_variadic(0, 42i32, 1024i32, 0i32);
- }
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
index 47e9173a907..632717f56bf 100644
--- a/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,27 +1,20 @@
-From 8e160daedd1a8c928024db648c2f851cddbbd000 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 14/16] Link stage 2 tools dynamically to libstd
+Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
+env var was removed and replaced with the following logic in builder.rs.
 
----
- src/bootstrap/tool.rs | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+The idea for this patch is to link stage2 tools dynamically as these will
+be distributed (if built). Intermediate tools from previous stages will
+be statically linked for convenience.
 
-diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
-index bd77f7a91d9..70477b44032 100644
---- a/src/bootstrap/tool.rs
-+++ b/src/bootstrap/tool.rs
-@@ -210,7 +210,9 @@ pub fn prepare_tool_cargo(
- 
-     // We don't want to build tools dynamically as they'll be running across
-     // stages and such and it's just easier if they're not dynamically linked.
--    cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+    if compiler.stage < 2 {
-+        cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+    }
- 
-     if source_type == SourceType::Submodule {
-         cargo.env("RUSTC_EXTERNAL_TOOL", "1");
--- 
-2.21.0
+@q66
 
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -1228,6 +1228,8 @@ impl<'a> Builder<'a> {
+         // linking all deps statically into the dylib.
+         if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
+             rustflags.arg("-Cprefer-dynamic");
++        } else if stage >= 2 {
++            rustflags.arg("-Cprefer-dynamic");
+         }
+ 
+         Cargo {
diff --git a/srcpkgs/rust/patches/0091-bootstrap.patch b/srcpkgs/rust/patches/0091-bootstrap.patch
deleted file mode 100644
index cd8c33e3f34..00000000000
--- a/srcpkgs/rust/patches/0091-bootstrap.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Rust 1.38 can't bootstrap itself. It has some ridiculous warnings enabled
-by default which break this (even though the compiler obviously needs to
-be able to compile itself just fine, that's what stage1 is all about).
-
-diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs
-index bd1a87c..138b7f4 100644
---- a/src/bootstrap/bin/main.rs
-+++ b/src/bootstrap/bin/main.rs
-@@ -5,9 +5,6 @@
- //! parent directory, and otherwise documentation can be found throughout the `build`
- //! directory in each respective module.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- 
- use bootstrap::{Config, Build};
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index 81e7e46..d3d84ca 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -15,9 +15,6 @@
- //! switching compilers for the bootstrap and for build scripts will probably
- //! never get replaced.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- use std::ffi::OsString;
- use std::io;
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index 184c9b1..2a8397a 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -2,9 +2,6 @@
- //!
- //! See comments in `src/bootstrap/rustc.rs` for more information.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- use std::process::Command;
- use std::path::PathBuf;
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 76cc0dd..5eeed7c 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -103,9 +103,6 @@
- //! More documentation can be found in each respective module below, and you can
- //! also check out the `src/bootstrap/README.md` file for more information.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- #![feature(core_intrinsics)]
- #![feature(drain_filter)]
- 
-diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs
-index a1aa189..f3f5913 100644
---- a/src/build_helper/lib.rs
-+++ b/src/build_helper/lib.rs
-@@ -1,6 +1,3 @@
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::fs::File;
- use std::path::{Path, PathBuf};
- use std::process::{Command, Stdio};
diff --git a/srcpkgs/rust/patches/0099-set-piclevel.patch b/srcpkgs/rust/patches/0099-set-piclevel.patch
new file mode 100644
index 00000000000..5582747b1e9
--- /dev/null
+++ b/srcpkgs/rust/patches/0099-set-piclevel.patch
@@ -0,0 +1,56 @@
+From 194307936110470487c41637684d4b09b3516af5 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 Nov 2019 10:52:00 -0600
+Subject: [PATCH] Configure LLVM module PIC level
+
+As of LLVM 9, this is required for 32-bit PowerPC to properly generate
+PLT references. Previously, only BigPIC was supported; now LLVM supports
+both BigPIC and SmallPIC, and there is no default value provided.
+---
+ src/librustc_codegen_llvm/context.rs  | 4 ++++
+ src/librustc_codegen_llvm/llvm/ffi.rs | 1 +
+ src/rustllvm/PassWrapper.cpp          | 4 ++++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
+index 2da938771721..4a40349cb73e 100644
+--- a/src/librustc_codegen_llvm/context.rs
++++ b/src/librustc_codegen_llvm/context.rs
+@@ -203,6 +203,10 @@ pub unsafe fn create_module(
+     let llvm_target = SmallCStr::new(&sess.target.target.llvm_target);
+     llvm::LLVMRustSetNormalizedTarget(llmod, llvm_target.as_ptr());
+ 
++    if get_reloc_model(sess) == llvm::RelocMode::PIC {
++        llvm::LLVMRustSetModulePICLevel(llmod);
++    }
++
+     if is_pie_binary(sess) {
+         llvm::LLVMRustSetModulePIELevel(llmod);
+     }
+diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
+index c69942ef3f2d..7f7b5b22d9af 100644
+--- a/src/librustc_codegen_llvm/llvm/ffi.rs
++++ b/src/librustc_codegen_llvm/llvm/ffi.rs
+@@ -1805,6 +1805,7 @@ extern "C" {
+ 
+     pub fn LLVMRustSetComdat(M: &'a Module, V: &'a Value, Name: *const c_char);
+     pub fn LLVMRustUnsetComdat(V: &Value);
++    pub fn LLVMRustSetModulePICLevel(M: &Module);
+     pub fn LLVMRustSetModulePIELevel(M: &Module);
+     pub fn LLVMRustModuleBufferCreate(M: &Module) -> &'static mut ModuleBuffer;
+     pub fn LLVMRustModuleBufferPtr(p: &ModuleBuffer) -> *const u8;
+diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
+index 0cda3465dc09..4c5bc20b86db 100644
+--- a/src/rustllvm/PassWrapper.cpp
++++ b/src/rustllvm/PassWrapper.cpp
+@@ -754,6 +754,10 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
+   unwrap(Module)->setDataLayout(Target->createDataLayout());
+ }
+ 
++extern "C" void LLVMRustSetModulePICLevel(LLVMModuleRef M) {
++  unwrap(M)->setPICLevel(PICLevel::Level::BigPIC);
++}
++
+ extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) {
+   unwrap(M)->setPIELevel(PIELevel::Level::Large);
+ }
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 2f5e5def714..698a5853d3f 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -1,7 +1,7 @@
 # Template file for 'rust'
 # partially adapted from Alpine/Adélie's Rust APKBUILD
 pkgname=rust
-version=1.38.0
+version=1.39.0
 revision=1
 _rust_dist_version=1.38.0
 _cargo_dist_version=0.39.0
@@ -9,15 +9,14 @@ _cargo_dist_version=0.39.0
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3"
-# using llvm9 results in broken executables for some targets
-makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm8"
+makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm"
 depends="rust-std"
 short_desc="Safe, concurrent, practical systems language"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=644263ca7c7106f8ee8fcde6bb16910d246b30668a74be20b8c7e0e9f4a52d80
+checksum=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -26,7 +25,7 @@ build_options="static_llvm"
 _bootstrap_dir="stage0-bootstrap"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" cargo llvm8"
+	hostmakedepends+=" cargo llvm"
 	# These are required for building the buildhost's stage0/1
 	hostmakedepends+=" libffi-devel libxml2-devel ncurses-devel zlib-devel"
 else

From 17e30ece9907592ae83539fdd26595d62de50ee0 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 13:47:33 +0100
Subject: [PATCH 2/4] cargo: update to 0.40.0

---
 srcpkgs/cargo/template | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 584ca07efe2..008ba9e3bde 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.39.0
+version=0.40.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust
@@ -11,10 +11,11 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
+_libgit2_ver=0.9.1
 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/rust-lang/git2-rs/archive/libgit2-sys-0.8.2.tar.gz"
-checksum="1fade63d5c09eab6fa234a1fdf64693ccf1b63398a316ad27edeb1f76ee4a57e
- c6597bcdc2be7a2fd70c1bb8fdc75883ca5df6aea33f0354c5a8124eacc0938b"
+ https://github.com/rust-lang/git2-rs/archive/libgit2-sys-${_libgit2_ver}.tar.gz"
+checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d
+ 81e20fa9a0f6ea3e3a0e6458148f3dea4a89af87d34128d4375f2b7fd661a49c"
 _cargo_dist_version=0.39.0
 build_options="static"
 
@@ -79,8 +80,8 @@ post_extract() {
 		cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo
 	fi
 
-	# need this for the patch to work
-	cp -R ${XBPS_BUILDDIR}/git2-rs-libgit2-sys-0.8.2/libgit2-sys .
+	mv ${XBPS_BUILDDIR}/git2-rs-libgit2-sys-${_libgit2_ver} .
+	mv git2-rs-libgit2-sys-${_libgit2_ver}/libgit2-sys .
 }
 
 post_patch() {
@@ -110,6 +111,9 @@ do_build() {
 		cargo="./cargo"
 	fi
 
+	# gotta pin out libgit2-sys at the version
+	$cargo update
+	$cargo update --package libgit2-sys --precise ${_libgit2_ver}
 	$cargo build --release $(vopt_if static --features="all-static")
 }
 

From 5304cc09d1c8c2d7da883fe648eac22e80356f38 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 20:59:51 +0100
Subject: [PATCH 3/4] rust: nocross for now

[ci skip]
---
 srcpkgs/rust/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 698a5853d3f..4ee5a398d07 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -19,6 +19,7 @@ distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
 checksum=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357
 lib32disabled=yes
 patch_args="-Np1"
+nocross=yes
 
 build_options="static_llvm"
 

From c05781619e50718733c0c29c76a576803105e071 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 21:00:41 +0100
Subject: [PATCH 4/4] cargo: nocross for now

[ci skip]
---
 srcpkgs/cargo/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 008ba9e3bde..123b933dee7 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -18,6 +18,7 @@ checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d
  81e20fa9a0f6ea3e3a0e6458148f3dea4a89af87d34128d4375f2b7fd661a49c"
 _cargo_dist_version=0.39.0
 build_options="static"
+nocross=yes
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" cargo"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] rust: update to 1.39.0, cargo: update to 0.40.0
  2019-11-08 20:03 [PR PATCH] rust: update to 1.39.0, cargo: update to 0.40.0 voidlinux-github
@ 2019-11-08 23:53 ` " voidlinux-github
  2019-11-09  1:33 ` voidlinux-github
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-11-08 23:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages rust139
https://github.com/void-linux/void-packages/pull/16243

rust: update to 1.39.0, cargo: update to 0.40.0
This also switches to LLVM9.

Generally seems to work fine except Firefox fails to build now. Fix is probably to be done in Firefox. Some generated code from `style` fails to compile, with errors like

```
19:20.28 error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `gecko_bindings::structs::root::mozilla::GeckoBackground`:
```

As the generated file is one line, it spams the console really badly, but turns out that is not a new issue, so we can probably ignore that, as long as FF can get fixed.

Unbreak status:

- [ ] `firefox`
- [ ] `firefox-esr`
- [ ] `thunderbird`
- [ ] `icecat`


A patch file from https://github.com/void-linux/void-packages/pull/16243.patch is attached

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-rust139-16243.patch --]
[-- Type: text/x-diff, Size: 78077 bytes --]

From 0439a1358223fb39e12b39429e0b8c6a01bc8d72 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 3 Nov 2019 18:55:56 +0100
Subject: [PATCH 1/7] rust: update to 1.39.0

This also switches to LLVM9.
---
 ...ative-libraries-when-linking-static-.patch | 15 ++--
 ...dlib-and-musl_root-from-musl-targets.patch | 85 +++++++------------
 ...er-libgcc_eh-over-libunwind-for-musl.patch | 43 +++++++++-
 ...piletest-Match-suffixed-environments.patch | 48 -----------
 ...c-variadic-Fix-patterns-on-powerpc64.patch | 73 ----------------
 ...-stage-2-tools-dynamically-to-libstd.patch | 41 ++++-----
 srcpkgs/rust/patches/0091-bootstrap.patch     | 71 ----------------
 srcpkgs/rust/patches/0099-set-piclevel.patch  | 56 ++++++++++++
 srcpkgs/rust/template                         |  9 +-
 9 files changed, 154 insertions(+), 287 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
 delete mode 100644 srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
 delete mode 100644 srcpkgs/rust/patches/0091-bootstrap.patch
 create mode 100644 srcpkgs/rust/patches/0099-set-piclevel.patch

diff --git a/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
index 854cd61e68e..74e9e1e1b1d 100644
--- a/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
@@ -19,7 +19,7 @@ diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/ba
 index e3d297e7862..974e8c0239b 100644
 --- a/src/librustc_codegen_ssa/back/link.rs
 +++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1571,9 +1571,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
+@@ -1602,9 +1602,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
      }
  }
  
@@ -30,11 +30,11 @@ index e3d297e7862..974e8c0239b 100644
  //
  // 1. The upstream crate is an rlib. In this case we *must* link in the
  // native dependency because the rlib is just an archive.
-@@ -1616,7 +1614,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
+@@ -1647,7 +1645,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
                  continue
              }
              match lib.kind {
--                NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
+-                NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
 +                NativeLibraryKind::NativeUnknown => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
@@ -43,14 +43,11 @@ index e3d297e7862..974e8c0239b 100644
 +                        && sess.crt_static()
 +                        && !sess.target.target.options.crt_static_allows_dylibs
 +                    {
-+                        cmd.link_staticlib(&name.as_str())
++                        cmd.link_staticlib(name)
 +                    } else {
-+                        cmd.link_dylib(&name.as_str())
++                        cmd.link_dylib(name)
 +                    }
 +                },
-                 NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
+                 NativeLibraryKind::NativeFramework => cmd.link_framework(name),
                  NativeLibraryKind::NativeStaticNobundle => {
                      // Link "static-nobundle" native libs only if the crate they originate from
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 88e05b3887d..af7ed0b86c6 100644
--- a/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,3 +1,5 @@
+Updated from:
+
 From e8ef432c23ea9fb70b28bea07042b33f1050569b Mon Sep 17 00:00:00 2001
 From: Samuel Holland <samuel@sholland.org>
 Date: Fri, 8 Sep 2017 22:11:14 -0500
@@ -20,10 +22,10 @@ Subject: [PATCH 05/16] Remove -nostdlib and musl_root from musl targets
  13 files changed, 4 insertions(+), 152 deletions(-)
 
 diff --git a/config.toml.example b/config.toml.example
-index c14adf8ce33..8ec8d2bbbb7 100644
+index 848147c2..2aea23d4 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -479,12 +479,6 @@
+@@ -469,12 +469,6 @@
  # only use static libraries. If unset, the target's default linkage is used.
  #crt-static = false
  
@@ -36,32 +38,11 @@ index c14adf8ce33..8ec8d2bbbb7 100644
  # The root location of the `wasm32-wasi` sysroot.
  #wasi-root = "..."
  
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index 595deb07ec8..c077dc1581e 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -145,16 +145,6 @@ fn main() {
-             cmd.arg("-Cprefer-dynamic");
-         }
- 
--        // Help the libc crate compile by assisting it in finding various
--        // sysroot native libraries.
--        if let Some(s) = env::var_os("MUSL_ROOT") {
--            if target.contains("musl") {
--                let mut root = OsString::from("native=");
--                root.push(&s);
--                root.push("/lib");
--                cmd.arg("-L").arg(&root);
--            }
--        }
-         if let Some(s) = env::var_os("WASI_ROOT") {
-             let mut root = OsString::from("native=");
-             root.push(&s);
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 400375cd201..0394ab7a8a7 100644
+index a4cb81d3..b4247e74 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -84,7 +84,7 @@ pub fn find(build: &mut Build) {
+@@ -86,7 +86,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -70,7 +51,7 @@ index 400375cd201..0394ab7a8a7 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -107,7 +107,7 @@ pub fn find(build: &mut Build) {
+@@ -109,7 +109,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -79,7 +60,7 @@ index 400375cd201..0394ab7a8a7 100644
              true
          } else {
              false
-@@ -134,8 +134,7 @@ pub fn find(build: &mut Build) {
+@@ -136,8 +136,7 @@ pub fn find(build: &mut Build) {
  fn set_compiler(cfg: &mut cc::Build,
                  compiler: Language,
                  target: Interned<String>,
@@ -89,7 +70,7 @@ index 400375cd201..0394ab7a8a7 100644
      match &*target {
          // When compiling for android we may have the NDK configured in the
          // config.toml in which case we look there. Otherwise the default
-@@ -175,26 +174,6 @@ fn set_compiler(cfg: &mut cc::Build,
+@@ -177,26 +176,6 @@ fn set_compiler(cfg: &mut cc::Build,
              }
          }
  
@@ -117,7 +98,7 @@ index 400375cd201..0394ab7a8a7 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 576267e6948..8e5de3907f6 100644
+index 6ea32edf..afdf6fcf 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
 @@ -116,20 +116,7 @@ impl Step for Std {
@@ -142,24 +123,27 @@ index 576267e6948..8e5de3907f6 100644
          for &obj in &["crt1.o"] {
              builder.copy(
                  &builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj),
-@@ -219,12 +206,6 @@ pub fn std_cargo(builder: &Builder<'_>,
+@@ -220,15 +207,6 @@ pub fn std_cargo(builder: &Builder<'_>,
              .arg("--manifest-path")
-             .arg(builder.src.join("src/libstd/Cargo.toml"));
+             .arg(builder.src.join("src/libtest/Cargo.toml"));
  
+-        // Help the libc crate compile by assisting it in finding various
+-        // sysroot native libraries.
 -        if target.contains("musl") {
 -            if let Some(p) = builder.musl_root(target) {
--                cargo.env("MUSL_ROOT", p);
+-                let root = format!("native={}/lib", p.to_str().unwrap());
+-                cargo.rustflag("-L").rustflag(&root);
 -            }
 -        }
 -
          if target.ends_with("-wasi") {
              if let Some(p) = builder.wasi_root(target) {
-                 cargo.env("WASI_ROOT", p);
+                 let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 66f504ea924..5bb211501b1 100644
+index 52b5cd88..cc191271 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -133,8 +133,6 @@ pub struct Config {
+@@ -131,8 +131,6 @@ pub struct Config {
      pub print_step_timings: bool,
      pub missing_tools: bool,
  
@@ -168,7 +152,7 @@ index 66f504ea924..5bb211501b1 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -169,7 +167,6 @@ pub struct Target {
+@@ -167,7 +165,6 @@ pub struct Target {
      pub linker: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub crt_static: Option<bool>,
@@ -176,7 +160,7 @@ index 66f504ea924..5bb211501b1 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -307,7 +304,6 @@ struct Rust {
+@@ -305,7 +302,6 @@ struct Rust {
      backtrace: Option<bool>,
      default_linker: Option<String>,
      channel: Option<String>,
@@ -184,7 +168,7 @@ index 66f504ea924..5bb211501b1 100644
      rpath: Option<bool>,
      optimize_tests: Option<bool>,
      codegen_tests: Option<bool>,
-@@ -346,7 +342,6 @@ struct TomlTarget {
+@@ -342,7 +338,6 @@ struct TomlTarget {
      linker: Option<String>,
      android_ndk: Option<String>,
      crt_static: Option<bool>,
@@ -192,15 +176,15 @@ index 66f504ea924..5bb211501b1 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
  }
-@@ -569,7 +564,6 @@ impl Config {
+@@ -562,7 +557,6 @@ impl Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker.clone();
 -            config.musl_root = rust.musl_root.clone().map(PathBuf::from);
              config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
-             set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
+             set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -607,7 +601,6 @@ impl Config {
+@@ -600,7 +594,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
                  target.linker = cfg.linker.clone().map(PathBuf::from);
                  target.crt_static = cfg.crt_static.clone();
@@ -209,7 +193,7 @@ index 66f504ea924..5bb211501b1 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
  
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 907983d43ad..e91f6fcbe4b 100755
+index 346f0cb2..80409781 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -110,30 +110,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -244,10 +228,10 @@ index 907983d43ad..e91f6fcbe4b 100755
    "rootfs in qemu testing, you probably don't want to use this")
  v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 867df81d972..4fb57aa6db6 100644
+index d292609f..ff5f7e16 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -847,14 +847,6 @@ impl Build {
+@@ -835,14 +835,6 @@ impl Build {
          }
      }
  
@@ -263,10 +247,10 @@ index 867df81d972..4fb57aa6db6 100644
      fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
          self.config.target_config.get(&target)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index dc65fb9b797..060ba6d9e42 100644
+index bffe748f..3b109548 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -176,34 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -187,30 +187,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -285,10 +269,6 @@ index dc65fb9b797..060ba6d9e42 100644
 -                        panic!("couldn't find libc.a in musl dir: {}",
 -                               root.join("lib").display());
 -                    }
--                    if fs::metadata(root.join("lib/libunwind.a")).is_err() {
--                        panic!("couldn't find libunwind.a in musl dir: {}",
--                               root.join("lib").display());
--                    }
 -                }
 -                None => {
 -                    panic!("when targeting MUSL either the rust.musl-root \
@@ -302,7 +282,7 @@ index dc65fb9b797..060ba6d9e42 100644
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
 diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index e294e63982d..58ae91a96aa 100644
+index 17fecb3b..18732066 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
 @@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
@@ -334,6 +314,3 @@ index e294e63982d..58ae91a96aa 100644
      // These targets statically link libc by default
      base.crt_static_default = true;
      // These targets allow the user to choose between static and dynamic linking.
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
index 2f109444886..d32841103a1 100644
--- a/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ b/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -1,3 +1,5 @@
+Additions for build.rs by q66, necessary for our musl setup.
+
 From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001
 From: Samuel Holland <samuel@sholland.org>
 Date: Sat, 9 Sep 2017 00:14:16 -0500
@@ -19,6 +21,41 @@ index 9182e349b19..0377fbb58fc 100644
 +#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
  #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
  extern {}
--- 
-2.21.0
-
+diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
+index f24d957..28828e5 100644
+--- a/src/libunwind/build.rs
++++ b/src/libunwind/build.rs
+@@ -5,15 +5,11 @@ fn main() {
+     let target = env::var("TARGET").expect("TARGET was not set");
+ 
+     if cfg!(feature = "llvm-libunwind") &&
+-        ((target.contains("linux") && !target.contains("musl")) ||
+-         target.contains("fuchsia")) {
++        (target.contains("linux") || target.contains("fuchsia")) {
+         // Build the unwinding from libunwind C/C++ source code.
+         llvm_libunwind::compile();
+     } else if target.contains("linux") {
+-        if target.contains("musl") {
+-            // linking for musl is handled in lib.rs
+-            llvm_libunwind::compile();
+-        } else if !target.contains("android") {
++        if !target.contains("android") {
+             println!("cargo:rustc-link-lib=gcc_s");
+         }
+     } else if target.contains("freebsd") {
+@@ -99,15 +95,6 @@ mod llvm_libunwind {
+             cfg.file(root.join("src").join(src));
+         }
+ 
+-        if target_env == "musl" {
+-            // use the same C compiler command to compile C++ code so we do not need to setup the
+-            // C++ compiler env variables on the builders
+-            cfg.cpp(false);
+-            // linking for musl is handled in lib.rs
+-            cfg.cargo_metadata(false);
+-            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
+-        }
+-
+         cfg.compile("unwind");
+     }
+ }
diff --git a/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch b/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
deleted file mode 100644
index 9ca4d99000c..00000000000
--- a/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0b28aa018f3f64913101495ce9806d356230856e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:10:10 -0500
-Subject: [PATCH 09/16] compiletest: Match suffixed environments
-
----
- src/tools/compiletest/src/header.rs | 2 +-
- src/tools/compiletest/src/util.rs   | 8 ++++++--
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
-index 52f777db2da..4bf3c1a8527 100644
---- a/src/tools/compiletest/src/header.rs
-+++ b/src/tools/compiletest/src/header.rs
-@@ -820,10 +820,10 @@ impl Config {
- 
-             if name == "test" ||
-                 util::matches_os(&self.target, name) ||             // target
-+                util::matches_env(&self.target, name) ||            // env
-                 name == util::get_arch(&self.target) ||             // architecture
-                 name == util::get_pointer_width(&self.target) ||    // pointer width
-                 name == self.stage_id.split('-').next().unwrap() || // stage
--                Some(name) == util::get_env(&self.target) ||        // env
-                 (self.target != self.host && name == "cross-compile") ||
-                 match self.compare_mode {
-                     Some(CompareMode::Nll) => name == "compare-mode-nll",
-diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 8caf5ca00f5..d23f4edc55d 100644
---- a/src/tools/compiletest/src/util.rs
-+++ b/src/tools/compiletest/src/util.rs
-@@ -101,8 +101,12 @@ pub fn get_arch(triple: &str) -> &'static str {
-     panic!("Cannot determine Architecture from triple");
- }
- 
--pub fn get_env(triple: &str) -> Option<&str> {
--    triple.split('-').nth(3)
-+pub fn matches_env(triple: &str, name: &str) -> bool {
-+    if let Some(env) = triple.split('-').nth(3) {
-+        env.starts_with(name)
-+    } else {
-+        false
-+    }
- }
- 
- pub fn get_pointer_width(triple: &str) -> &'static str {
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch b/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
deleted file mode 100644
index 2e2111edbbc..00000000000
--- a/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From e6a01c436377109808cac2d49ec30968a02b561d Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:09:15 -0500
-Subject: [PATCH 10/16] test/c-variadic: Fix patterns on powerpc64
-
----
- src/test/codegen/c-variadic.rs | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/src/test/codegen/c-variadic.rs b/src/test/codegen/c-variadic.rs
-index bb90a9653f5..6ef77ca483f 100644
---- a/src/test/codegen/c-variadic.rs
-+++ b/src/test/codegen/c-variadic.rs
-@@ -14,13 +14,13 @@ extern "C" {
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_0() {
-     // Ensure that we correctly call foreign C-variadic functions.
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM:i32( signext)?]] 0)
-     foreign_c_variadic_0(0);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42)
-     foreign_c_variadic_0(0, 42i32);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
-     foreign_c_variadic_0(0, 42i32, 1024i32);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
-     foreign_c_variadic_0(0, 42i32, 1024i32, 0i32);
- }
- 
-@@ -34,18 +34,18 @@ pub unsafe extern "C" fn use_foreign_c_variadic_1_0(ap: VaList) {
- 
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_1(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 42)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 42)
-     foreign_c_variadic_1(ap, 42i32);
- }
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_2(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42)
-     foreign_c_variadic_1(ap, 2i32, 42i32);
- }
- 
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_3(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42, i32 0)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42, [[PARAM]] 0)
-     foreign_c_variadic_1(ap, 2i32, 42i32, 0i32);
- }
- 
-@@ -64,12 +64,12 @@ pub unsafe extern "C" fn c_variadic(n: i32, mut ap: ...) -> i32 {
- // Ensure that we generate the correct `call` signature when calling a Rust
- // defined C-variadic.
- pub unsafe fn test_c_variadic_call() {
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0)
-+    // CHECK: call [[RET:(signext )?i32]] (i32, ...) @c_variadic([[PARAM]] 0)
-     c_variadic(0);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42)
-     c_variadic(0, 42i32);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
-     c_variadic(0, 42i32, 1024i32);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024, i32 0)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
-     c_variadic(0, 42i32, 1024i32, 0i32);
- }
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
index 47e9173a907..632717f56bf 100644
--- a/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,27 +1,20 @@
-From 8e160daedd1a8c928024db648c2f851cddbbd000 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 14/16] Link stage 2 tools dynamically to libstd
+Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
+env var was removed and replaced with the following logic in builder.rs.
 
----
- src/bootstrap/tool.rs | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+The idea for this patch is to link stage2 tools dynamically as these will
+be distributed (if built). Intermediate tools from previous stages will
+be statically linked for convenience.
 
-diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
-index bd77f7a91d9..70477b44032 100644
---- a/src/bootstrap/tool.rs
-+++ b/src/bootstrap/tool.rs
-@@ -210,7 +210,9 @@ pub fn prepare_tool_cargo(
- 
-     // We don't want to build tools dynamically as they'll be running across
-     // stages and such and it's just easier if they're not dynamically linked.
--    cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+    if compiler.stage < 2 {
-+        cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+    }
- 
-     if source_type == SourceType::Submodule {
-         cargo.env("RUSTC_EXTERNAL_TOOL", "1");
--- 
-2.21.0
+@q66
 
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -1228,6 +1228,8 @@ impl<'a> Builder<'a> {
+         // linking all deps statically into the dylib.
+         if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
+             rustflags.arg("-Cprefer-dynamic");
++        } else if stage >= 2 {
++            rustflags.arg("-Cprefer-dynamic");
+         }
+ 
+         Cargo {
diff --git a/srcpkgs/rust/patches/0091-bootstrap.patch b/srcpkgs/rust/patches/0091-bootstrap.patch
deleted file mode 100644
index cd8c33e3f34..00000000000
--- a/srcpkgs/rust/patches/0091-bootstrap.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Rust 1.38 can't bootstrap itself. It has some ridiculous warnings enabled
-by default which break this (even though the compiler obviously needs to
-be able to compile itself just fine, that's what stage1 is all about).
-
-diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs
-index bd1a87c..138b7f4 100644
---- a/src/bootstrap/bin/main.rs
-+++ b/src/bootstrap/bin/main.rs
-@@ -5,9 +5,6 @@
- //! parent directory, and otherwise documentation can be found throughout the `build`
- //! directory in each respective module.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- 
- use bootstrap::{Config, Build};
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index 81e7e46..d3d84ca 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -15,9 +15,6 @@
- //! switching compilers for the bootstrap and for build scripts will probably
- //! never get replaced.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- use std::ffi::OsString;
- use std::io;
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index 184c9b1..2a8397a 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -2,9 +2,6 @@
- //!
- //! See comments in `src/bootstrap/rustc.rs` for more information.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- use std::process::Command;
- use std::path::PathBuf;
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 76cc0dd..5eeed7c 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -103,9 +103,6 @@
- //! More documentation can be found in each respective module below, and you can
- //! also check out the `src/bootstrap/README.md` file for more information.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- #![feature(core_intrinsics)]
- #![feature(drain_filter)]
- 
-diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs
-index a1aa189..f3f5913 100644
---- a/src/build_helper/lib.rs
-+++ b/src/build_helper/lib.rs
-@@ -1,6 +1,3 @@
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::fs::File;
- use std::path::{Path, PathBuf};
- use std::process::{Command, Stdio};
diff --git a/srcpkgs/rust/patches/0099-set-piclevel.patch b/srcpkgs/rust/patches/0099-set-piclevel.patch
new file mode 100644
index 00000000000..5582747b1e9
--- /dev/null
+++ b/srcpkgs/rust/patches/0099-set-piclevel.patch
@@ -0,0 +1,56 @@
+From 194307936110470487c41637684d4b09b3516af5 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 Nov 2019 10:52:00 -0600
+Subject: [PATCH] Configure LLVM module PIC level
+
+As of LLVM 9, this is required for 32-bit PowerPC to properly generate
+PLT references. Previously, only BigPIC was supported; now LLVM supports
+both BigPIC and SmallPIC, and there is no default value provided.
+---
+ src/librustc_codegen_llvm/context.rs  | 4 ++++
+ src/librustc_codegen_llvm/llvm/ffi.rs | 1 +
+ src/rustllvm/PassWrapper.cpp          | 4 ++++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
+index 2da938771721..4a40349cb73e 100644
+--- a/src/librustc_codegen_llvm/context.rs
++++ b/src/librustc_codegen_llvm/context.rs
+@@ -203,6 +203,10 @@ pub unsafe fn create_module(
+     let llvm_target = SmallCStr::new(&sess.target.target.llvm_target);
+     llvm::LLVMRustSetNormalizedTarget(llmod, llvm_target.as_ptr());
+ 
++    if get_reloc_model(sess) == llvm::RelocMode::PIC {
++        llvm::LLVMRustSetModulePICLevel(llmod);
++    }
++
+     if is_pie_binary(sess) {
+         llvm::LLVMRustSetModulePIELevel(llmod);
+     }
+diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
+index c69942ef3f2d..7f7b5b22d9af 100644
+--- a/src/librustc_codegen_llvm/llvm/ffi.rs
++++ b/src/librustc_codegen_llvm/llvm/ffi.rs
+@@ -1805,6 +1805,7 @@ extern "C" {
+ 
+     pub fn LLVMRustSetComdat(M: &'a Module, V: &'a Value, Name: *const c_char);
+     pub fn LLVMRustUnsetComdat(V: &Value);
++    pub fn LLVMRustSetModulePICLevel(M: &Module);
+     pub fn LLVMRustSetModulePIELevel(M: &Module);
+     pub fn LLVMRustModuleBufferCreate(M: &Module) -> &'static mut ModuleBuffer;
+     pub fn LLVMRustModuleBufferPtr(p: &ModuleBuffer) -> *const u8;
+diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
+index 0cda3465dc09..4c5bc20b86db 100644
+--- a/src/rustllvm/PassWrapper.cpp
++++ b/src/rustllvm/PassWrapper.cpp
+@@ -754,6 +754,10 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
+   unwrap(Module)->setDataLayout(Target->createDataLayout());
+ }
+ 
++extern "C" void LLVMRustSetModulePICLevel(LLVMModuleRef M) {
++  unwrap(M)->setPICLevel(PICLevel::Level::BigPIC);
++}
++
+ extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) {
+   unwrap(M)->setPIELevel(PIELevel::Level::Large);
+ }
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 2f5e5def714..698a5853d3f 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -1,7 +1,7 @@
 # Template file for 'rust'
 # partially adapted from Alpine/Adélie's Rust APKBUILD
 pkgname=rust
-version=1.38.0
+version=1.39.0
 revision=1
 _rust_dist_version=1.38.0
 _cargo_dist_version=0.39.0
@@ -9,15 +9,14 @@ _cargo_dist_version=0.39.0
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3"
-# using llvm9 results in broken executables for some targets
-makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm8"
+makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm"
 depends="rust-std"
 short_desc="Safe, concurrent, practical systems language"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=644263ca7c7106f8ee8fcde6bb16910d246b30668a74be20b8c7e0e9f4a52d80
+checksum=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -26,7 +25,7 @@ build_options="static_llvm"
 _bootstrap_dir="stage0-bootstrap"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" cargo llvm8"
+	hostmakedepends+=" cargo llvm"
 	# These are required for building the buildhost's stage0/1
 	hostmakedepends+=" libffi-devel libxml2-devel ncurses-devel zlib-devel"
 else

From 17e30ece9907592ae83539fdd26595d62de50ee0 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 13:47:33 +0100
Subject: [PATCH 2/7] cargo: update to 0.40.0

---
 srcpkgs/cargo/template | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 584ca07efe2..008ba9e3bde 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.39.0
+version=0.40.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust
@@ -11,10 +11,11 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
+_libgit2_ver=0.9.1
 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/rust-lang/git2-rs/archive/libgit2-sys-0.8.2.tar.gz"
-checksum="1fade63d5c09eab6fa234a1fdf64693ccf1b63398a316ad27edeb1f76ee4a57e
- c6597bcdc2be7a2fd70c1bb8fdc75883ca5df6aea33f0354c5a8124eacc0938b"
+ https://github.com/rust-lang/git2-rs/archive/libgit2-sys-${_libgit2_ver}.tar.gz"
+checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d
+ 81e20fa9a0f6ea3e3a0e6458148f3dea4a89af87d34128d4375f2b7fd661a49c"
 _cargo_dist_version=0.39.0
 build_options="static"
 
@@ -79,8 +80,8 @@ post_extract() {
 		cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo
 	fi
 
-	# need this for the patch to work
-	cp -R ${XBPS_BUILDDIR}/git2-rs-libgit2-sys-0.8.2/libgit2-sys .
+	mv ${XBPS_BUILDDIR}/git2-rs-libgit2-sys-${_libgit2_ver} .
+	mv git2-rs-libgit2-sys-${_libgit2_ver}/libgit2-sys .
 }
 
 post_patch() {
@@ -110,6 +111,9 @@ do_build() {
 		cargo="./cargo"
 	fi
 
+	# gotta pin out libgit2-sys at the version
+	$cargo update
+	$cargo update --package libgit2-sys --precise ${_libgit2_ver}
 	$cargo build --release $(vopt_if static --features="all-static")
 }
 

From 5304cc09d1c8c2d7da883fe648eac22e80356f38 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 20:59:51 +0100
Subject: [PATCH 3/7] rust: nocross for now

[ci skip]
---
 srcpkgs/rust/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 698a5853d3f..4ee5a398d07 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -19,6 +19,7 @@ distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
 checksum=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357
 lib32disabled=yes
 patch_args="-Np1"
+nocross=yes
 
 build_options="static_llvm"
 

From c05781619e50718733c0c29c76a576803105e071 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 21:00:41 +0100
Subject: [PATCH 4/7] cargo: nocross for now

[ci skip]
---
 srcpkgs/cargo/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 008ba9e3bde..123b933dee7 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -18,6 +18,7 @@ checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d
  81e20fa9a0f6ea3e3a0e6458148f3dea4a89af87d34128d4375f2b7fd661a49c"
 _cargo_dist_version=0.39.0
 build_options="static"
+nocross=yes
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" cargo"

From 18276a1b1e5d92768002f308aa209a28839c238d Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 9 Nov 2019 00:49:26 +0100
Subject: [PATCH 5/7] firefox: add patch for rust 1.39

---
 .../patches/firefox-70.0.1-rust-1.39+.patch   | 165 ++++++++++++++++++
 1 file changed, 165 insertions(+)
 create mode 100644 srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch

diff --git a/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch b/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch
new file mode 100644
index 00000000000..d4c9fe3a941
--- /dev/null
+++ b/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch
@@ -0,0 +1,165 @@
+Source: Gentoo
+
+Based on https://github.com/rust-lang/rust/issues/64710
+
+--- third_party/rust/bindgen/.cargo-checksum.json.orig
++++ third_party/rust/bindgen/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"a970d1a9e47f029fe3e3ce43ae4292054ad60c4490e035b86b669fcf32015624","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","csmith-fuzzing/README.md":"7107b70fedb0c0a0cadb3c439a49c1bd0119a6d38dc63b1aecc74d1942256ef2","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"0009b8b6e3f6c33ec2776ec4cb8de2625ae8be22c9f0433c39b06bdd9fc7db4d","src/codegen/bitfield_unit.rs":"87be2d7f7774327a1608c2c4d64df869e17fb34b7efdacb4030b6794d98e40f3","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"aa0daff2061c6de31acfbd113190889e0f7ca2d2b8d4f46740bfd5832c33e4d2","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"ad116e2af755219bd556e8ee00ca48562f64a161d0b2c94846ae01297446ea0d","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"82511f1bb8cbd04d98f57b000903b0264237962af93a72a58220437213eba1ef","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"5788372d27bdbaaf0454bc17be31a5480918bc41a8a1c4832e8c61185c07f9cd","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"b73865b6689d4f3546edd91909a47c329c4ae630ea97715d29bc683ae1dc17ad","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"78e245835efcd22b5cc878a8a7031171116c708408bdb48b0c9284a067041e56","src/ir/context.rs":"8fd64654343295e0e4a43efe5db6f64315dcd50a5015c3d86e90aae992e2fa9f","src/ir/derive.rs":"34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"7658cf68c00b1732dfa599c2d6b6a93a82de8401142591c3afe5fcb27d901a66","src/ir/function.rs":"c2feb2e26d47aa96a74af9912ada26be077e2b0c36d46fa10167da7109590500","src/ir/int.rs":"5b8d5bcedb04f39dc2d7e571bc04114b1f1e09cf294afe944c2e7879451c4378","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"e6771c8102b9f01b0c4b664bf1151b4773b599634a83895376ce122ca9f74f8b","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"a07ef7a3d099493555ae5a58b7b4bf9106a978e38a23b5ff445a83b92727ab62","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"8c96cd2a051e3f09b1b87b75cd9ed77e82e889c8309ebd3e4bc782960cf63e58","src/options.rs":"5b309b225cc51e665bd42ed3e7965a7cd73d984e4455a2d76987fc42ab271ff8","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"18270cdd7065ec045a6bb4bdcd5144d14a78b3aedb3bc5111e688773ac8b9ad0"}
+\ No newline at end of file
++{"files":{},"package":"18270cdd7065ec045a6bb4bdcd5144d14a78b3aedb3bc5111e688773ac8b9ad0"}
+--- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs.orig
++++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
+@@ -9,37 +9,22 @@ use std::ops;
+ use {HashMap, Entry};
+ 
+ /// The result of the `HasVtableAnalysis` for an individual item.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum HasVtableResult {
+-    /// The item has a vtable, but the actual vtable pointer is in a base
+-    /// member.
+-    BaseHasVtable,
++    /// The item does not have a vtable pointer.
++    No,
+ 
+     /// The item has a vtable and the actual vtable pointer is within this item.
+     SelfHasVtable,
+ 
+-    /// The item does not have a vtable pointer.
+-    No
++    /// The item has a vtable, but the actual vtable pointer is in a base
++    /// member.
++    BaseHasVtable,
+ }
+ 
+ impl Default for HasVtableResult {
+     fn default() -> Self {
+         HasVtableResult::No
+-    }
+-}
+-
+-impl cmp::PartialOrd for HasVtableResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::HasVtableResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (BaseHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, BaseHasVtable) => Some(cmp::Ordering::Less),
+-            (SelfHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, SelfHasVtable) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+     }
+ }
+ 
+--- third_party/rust/bindgen/src/ir/analysis/sizedness.rs.orig
++++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs
+@@ -22,13 +22,14 @@ use {HashMap, Entry};
+ ///
+ /// We initially assume that all types are `ZeroSized` and then update our
+ /// understanding as we learn more about each type.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum SizednessResult {
+-    /// Has some size that is known to be greater than zero. That doesn't mean
+-    /// it has a static size, but it is not zero sized for sure. In other words,
+-    /// it might contain an incomplete array or some other dynamically sized
+-    /// type.
+-    NonZeroSized,
++    /// The type is zero-sized.
++    ///
++    /// This means that if it is a C++ type, and is not being used as a base
++    /// member, then we must add an `_address` byte to enforce the
++    /// unique-address-per-distinct-object-instance rule.
++    ZeroSized,
+ 
+     /// Whether this type is zero-sized or not depends on whether a type
+     /// parameter is zero-sized or not.
+@@ -52,32 +53,16 @@ pub enum SizednessResult {
+     /// https://github.com/rust-lang/rust-bindgen/issues/586
+     DependsOnTypeParam,
+ 
+-    /// The type is zero-sized.
+-    ///
+-    /// This means that if it is a C++ type, and is not being used as a base
+-    /// member, then we must add an `_address` byte to enforce the
+-    /// unique-address-per-distinct-object-instance rule.
+-    ZeroSized,
++    /// Has some size that is known to be greater than zero. That doesn't mean
++    /// it has a static size, but it is not zero sized for sure. In other words,
++    /// it might contain an incomplete array or some other dynamically sized
++    /// type.
++    NonZeroSized,
+ }
+ 
+ impl Default for SizednessResult {
+     fn default() -> Self {
+         SizednessResult::ZeroSized
+-    }
+-}
+-
+-impl cmp::PartialOrd for SizednessResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::SizednessResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (NonZeroSized, _) => Some(cmp::Ordering::Greater),
+-            (_, NonZeroSized) => Some(cmp::Ordering::Less),
+-            (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater),
+-            (_, DependsOnTypeParam) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+     }
+ }
+ 
+--- third_party/rust/bindgen/src/ir/derive.rs.orig
++++ third_party/rust/bindgen/src/ir/derive.rs
+@@ -92,10 +92,10 @@ pub trait CanDeriveOrd {
+ ///
+ /// Initially we assume that we can derive trait for all types and then
+ /// update our understanding as we learn more about each type.
+-#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)]
++#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum CanDerive {
+-    /// No, we cannot.
+-    No,
++    /// Yes, we can derive automatically.
++    Yes,
+ 
+     /// The only thing that stops us from automatically deriving is that
+     /// array with more than maximum number of elements is used.
+@@ -103,29 +103,13 @@ pub enum CanDerive {
+     /// This means we probably can "manually" implement such trait.
+     Manually,
+ 
+-    /// Yes, we can derive automatically.
+-    Yes,
++    /// No, we cannot.
++    No,
+ }
+ 
+ impl Default for CanDerive {
+     fn default() -> CanDerive {
+         CanDerive::Yes
+-    }
+-}
+-
+-impl cmp::PartialOrd for CanDerive {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::CanDerive::*;
+-
+-        let ordering = match (*self, *rhs) {
+-            (x, y) if x == y => cmp::Ordering::Equal,
+-            (No, _) => cmp::Ordering::Greater,
+-            (_, No) => cmp::Ordering::Less,
+-            (Manually, _) => cmp::Ordering::Greater,
+-            (_, Manually) => cmp::Ordering::Less,
+-            _ => unreachable!()
+-        };
+-        Some(ordering)
+     }
+ }
+ 

From c1c4b6df286fbeb826be9906038ffb0088367b84 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 9 Nov 2019 00:49:38 +0100
Subject: [PATCH 6/7] firefox-esr: add patch for rust 1.39

---
 .../patches/firefox-68.2.0-rust-1.39+.patch   | 172 ++++++++++++++++++
 1 file changed, 172 insertions(+)
 create mode 100644 srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch

diff --git a/srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch b/srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch
new file mode 100644
index 00000000000..9494776e04f
--- /dev/null
+++ b/srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch
@@ -0,0 +1,172 @@
+Source: Gentoo
+
+Based on https://github.com/rust-lang/rust/issues/64710
+
+--- third_party/rust/bindgen/.cargo-checksum.json
++++ third_party/rust/bindgen/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"5788372d27bdbaaf0454bc17be31a5480918bc41a8a1c4832e8c61185c07f9cd","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"8dc10043d872e68e660ef96edca4d9733f95be45cdad4893462fa929b335014f","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"8c92a52c0f859c7bec7bfbc36b9d18f904baab0c8c9dc1b3e7af34de1a0b0da4","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"71f1a37f75b971ea5b0d8457473cc410947dbf706cb6d2c0338916910b78a675","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
+--- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
++++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
+@@ -9,17 +9,17 @@ use std::ops;
+ use {HashMap, Entry};
+ 
+ /// The result of the `HasVtableAnalysis` for an individual item.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum HasVtableResult {
+-    /// The item has a vtable, but the actual vtable pointer is in a base
+-    /// member.
+-    BaseHasVtable,
++    /// The item does not have a vtable pointer.
++    No,
+ 
+     /// The item has a vtable and the actual vtable pointer is within this item.
+     SelfHasVtable,
+ 
+-    /// The item does not have a vtable pointer.
+-    No
++    /// The item has a vtable, but the actual vtable pointer is in a base
++    /// member.
++    BaseHasVtable,
+ }
+ 
+ impl Default for HasVtableResult {
+@@ -28,21 +28,6 @@ impl Default for HasVtableResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for HasVtableResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::HasVtableResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (BaseHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, BaseHasVtable) => Some(cmp::Ordering::Less),
+-            (SelfHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, SelfHasVtable) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl HasVtableResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/analysis/sizedness.rs
++++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs
+@@ -22,13 +22,14 @@ use {HashMap, Entry};
+ ///
+ /// We initially assume that all types are `ZeroSized` and then update our
+ /// understanding as we learn more about each type.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum SizednessResult {
+-    /// Has some size that is known to be greater than zero. That doesn't mean
+-    /// it has a static size, but it is not zero sized for sure. In other words,
+-    /// it might contain an incomplete array or some other dynamically sized
+-    /// type.
+-    NonZeroSized,
++    /// The type is zero-sized.
++    ///
++    /// This means that if it is a C++ type, and is not being used as a base
++    /// member, then we must add an `_address` byte to enforce the
++    /// unique-address-per-distinct-object-instance rule.
++    ZeroSized,
+ 
+     /// Whether this type is zero-sized or not depends on whether a type
+     /// parameter is zero-sized or not.
+@@ -52,12 +53,11 @@ pub enum SizednessResult {
+     /// https://github.com/rust-lang-nursery/rust-bindgen/issues/586
+     DependsOnTypeParam,
+ 
+-    /// The type is zero-sized.
+-    ///
+-    /// This means that if it is a C++ type, and is not being used as a base
+-    /// member, then we must add an `_address` byte to enforce the
+-    /// unique-address-per-distinct-object-instance rule.
+-    ZeroSized,
++    /// Has some size that is known to be greater than zero. That doesn't mean
++    /// it has a static size, but it is not zero sized for sure. In other words,
++    /// it might contain an incomplete array or some other dynamically sized
++    /// type.
++    NonZeroSized,
+ }
+ 
+ impl Default for SizednessResult {
+@@ -66,21 +66,6 @@ impl Default for SizednessResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for SizednessResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::SizednessResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (NonZeroSized, _) => Some(cmp::Ordering::Greater),
+-            (_, NonZeroSized) => Some(cmp::Ordering::Less),
+-            (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater),
+-            (_, DependsOnTypeParam) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl SizednessResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/derive.rs
++++ third_party/rust/bindgen/src/ir/derive.rs
+@@ -92,10 +92,10 @@ pub trait CanDeriveOrd {
+ ///
+ /// Initially we assume that we can derive trait for all types and then
+ /// update our understanding as we learn more about each type.
+-#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)]
++#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum CanDerive {
+-    /// No, we cannot.
+-    No,
++    /// Yes, we can derive automatically.
++    Yes,
+ 
+     /// The only thing that stops us from automatically deriving is that
+     /// array with more than maximum number of elements is used.
+@@ -103,8 +103,8 @@ pub enum CanDerive {
+     /// This means we probably can "manually" implement such trait.
+     Manually,
+ 
+-    /// Yes, we can derive automatically.
+-    Yes,
++    /// No, we cannot.
++    No,
+ }
+ 
+ impl Default for CanDerive {
+@@ -113,22 +113,6 @@ impl Default for CanDerive {
+     }
+ }
+ 
+-impl cmp::PartialOrd for CanDerive {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::CanDerive::*;
+-
+-        let ordering = match (*self, *rhs) {
+-            (x, y) if x == y => cmp::Ordering::Equal,
+-            (No, _) => cmp::Ordering::Greater,
+-            (_, No) => cmp::Ordering::Less,
+-            (Manually, _) => cmp::Ordering::Greater,
+-            (_, Manually) => cmp::Ordering::Less,
+-            _ => unreachable!()
+-        };
+-        Some(ordering)
+-    }
+-}
+-
+ impl CanDerive {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {

From 815d3f5239d63b3c95a9609fbddca3dbc3ccad09 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 9 Nov 2019 00:49:52 +0100
Subject: [PATCH 7/7] thunderbird: add patch for rust 1.39

[ci skip]
---
 .../thunderbird-68.2.2-rust-1.39+.patch       | 172 ++++++++++++++++++
 1 file changed, 172 insertions(+)
 create mode 100644 srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch

diff --git a/srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch b/srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch
new file mode 100644
index 00000000000..9494776e04f
--- /dev/null
+++ b/srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch
@@ -0,0 +1,172 @@
+Source: Gentoo
+
+Based on https://github.com/rust-lang/rust/issues/64710
+
+--- third_party/rust/bindgen/.cargo-checksum.json
++++ third_party/rust/bindgen/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"5788372d27bdbaaf0454bc17be31a5480918bc41a8a1c4832e8c61185c07f9cd","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"8dc10043d872e68e660ef96edca4d9733f95be45cdad4893462fa929b335014f","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"8c92a52c0f859c7bec7bfbc36b9d18f904baab0c8c9dc1b3e7af34de1a0b0da4","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"71f1a37f75b971ea5b0d8457473cc410947dbf706cb6d2c0338916910b78a675","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
+--- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
++++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
+@@ -9,17 +9,17 @@ use std::ops;
+ use {HashMap, Entry};
+ 
+ /// The result of the `HasVtableAnalysis` for an individual item.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum HasVtableResult {
+-    /// The item has a vtable, but the actual vtable pointer is in a base
+-    /// member.
+-    BaseHasVtable,
++    /// The item does not have a vtable pointer.
++    No,
+ 
+     /// The item has a vtable and the actual vtable pointer is within this item.
+     SelfHasVtable,
+ 
+-    /// The item does not have a vtable pointer.
+-    No
++    /// The item has a vtable, but the actual vtable pointer is in a base
++    /// member.
++    BaseHasVtable,
+ }
+ 
+ impl Default for HasVtableResult {
+@@ -28,21 +28,6 @@ impl Default for HasVtableResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for HasVtableResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::HasVtableResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (BaseHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, BaseHasVtable) => Some(cmp::Ordering::Less),
+-            (SelfHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, SelfHasVtable) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl HasVtableResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/analysis/sizedness.rs
++++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs
+@@ -22,13 +22,14 @@ use {HashMap, Entry};
+ ///
+ /// We initially assume that all types are `ZeroSized` and then update our
+ /// understanding as we learn more about each type.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum SizednessResult {
+-    /// Has some size that is known to be greater than zero. That doesn't mean
+-    /// it has a static size, but it is not zero sized for sure. In other words,
+-    /// it might contain an incomplete array or some other dynamically sized
+-    /// type.
+-    NonZeroSized,
++    /// The type is zero-sized.
++    ///
++    /// This means that if it is a C++ type, and is not being used as a base
++    /// member, then we must add an `_address` byte to enforce the
++    /// unique-address-per-distinct-object-instance rule.
++    ZeroSized,
+ 
+     /// Whether this type is zero-sized or not depends on whether a type
+     /// parameter is zero-sized or not.
+@@ -52,12 +53,11 @@ pub enum SizednessResult {
+     /// https://github.com/rust-lang-nursery/rust-bindgen/issues/586
+     DependsOnTypeParam,
+ 
+-    /// The type is zero-sized.
+-    ///
+-    /// This means that if it is a C++ type, and is not being used as a base
+-    /// member, then we must add an `_address` byte to enforce the
+-    /// unique-address-per-distinct-object-instance rule.
+-    ZeroSized,
++    /// Has some size that is known to be greater than zero. That doesn't mean
++    /// it has a static size, but it is not zero sized for sure. In other words,
++    /// it might contain an incomplete array or some other dynamically sized
++    /// type.
++    NonZeroSized,
+ }
+ 
+ impl Default for SizednessResult {
+@@ -66,21 +66,6 @@ impl Default for SizednessResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for SizednessResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::SizednessResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (NonZeroSized, _) => Some(cmp::Ordering::Greater),
+-            (_, NonZeroSized) => Some(cmp::Ordering::Less),
+-            (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater),
+-            (_, DependsOnTypeParam) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl SizednessResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/derive.rs
++++ third_party/rust/bindgen/src/ir/derive.rs
+@@ -92,10 +92,10 @@ pub trait CanDeriveOrd {
+ ///
+ /// Initially we assume that we can derive trait for all types and then
+ /// update our understanding as we learn more about each type.
+-#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)]
++#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum CanDerive {
+-    /// No, we cannot.
+-    No,
++    /// Yes, we can derive automatically.
++    Yes,
+ 
+     /// The only thing that stops us from automatically deriving is that
+     /// array with more than maximum number of elements is used.
+@@ -103,8 +103,8 @@ pub enum CanDerive {
+     /// This means we probably can "manually" implement such trait.
+     Manually,
+ 
+-    /// Yes, we can derive automatically.
+-    Yes,
++    /// No, we cannot.
++    No,
+ }
+ 
+ impl Default for CanDerive {
+@@ -113,22 +113,6 @@ impl Default for CanDerive {
+     }
+ }
+ 
+-impl cmp::PartialOrd for CanDerive {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::CanDerive::*;
+-
+-        let ordering = match (*self, *rhs) {
+-            (x, y) if x == y => cmp::Ordering::Equal,
+-            (No, _) => cmp::Ordering::Greater,
+-            (_, No) => cmp::Ordering::Less,
+-            (Manually, _) => cmp::Ordering::Greater,
+-            (_, Manually) => cmp::Ordering::Less,
+-            _ => unreachable!()
+-        };
+-        Some(ordering)
+-    }
+-}
+-
+ impl CanDerive {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] rust: update to 1.39.0, cargo: update to 0.40.0
  2019-11-08 20:03 [PR PATCH] rust: update to 1.39.0, cargo: update to 0.40.0 voidlinux-github
  2019-11-08 23:53 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-11-09  1:33 ` voidlinux-github
  2019-11-09 20:39 ` voidlinux-github
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-11-09  1:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages rust139
https://github.com/void-linux/void-packages/pull/16243

rust: update to 1.39.0, cargo: update to 0.40.0
This also switches to LLVM9.

Generally seems to work fine except Firefox fails to build now. Fix is probably to be done in Firefox. Some generated code from `style` fails to compile, with errors like

```
19:20.28 error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `gecko_bindings::structs::root::mozilla::GeckoBackground`:
```

As the generated file is one line, it spams the console really badly, but turns out that is not a new issue, so we can probably ignore that, as long as FF can get fixed.

Unbreak status:

- [x] `firefox`
- [ ] `firefox-esr`
- [ ] `thunderbird`
- [ ] `icecat`


A patch file from https://github.com/void-linux/void-packages/pull/16243.patch is attached

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-rust139-16243.patch --]
[-- Type: text/x-diff, Size: 94605 bytes --]

From 0439a1358223fb39e12b39429e0b8c6a01bc8d72 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 3 Nov 2019 18:55:56 +0100
Subject: [PATCH 1/8] rust: update to 1.39.0

This also switches to LLVM9.
---
 ...ative-libraries-when-linking-static-.patch | 15 ++--
 ...dlib-and-musl_root-from-musl-targets.patch | 85 +++++++------------
 ...er-libgcc_eh-over-libunwind-for-musl.patch | 43 +++++++++-
 ...piletest-Match-suffixed-environments.patch | 48 -----------
 ...c-variadic-Fix-patterns-on-powerpc64.patch | 73 ----------------
 ...-stage-2-tools-dynamically-to-libstd.patch | 41 ++++-----
 srcpkgs/rust/patches/0091-bootstrap.patch     | 71 ----------------
 srcpkgs/rust/patches/0099-set-piclevel.patch  | 56 ++++++++++++
 srcpkgs/rust/template                         |  9 +-
 9 files changed, 154 insertions(+), 287 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
 delete mode 100644 srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
 delete mode 100644 srcpkgs/rust/patches/0091-bootstrap.patch
 create mode 100644 srcpkgs/rust/patches/0099-set-piclevel.patch

diff --git a/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
index 854cd61e68e..74e9e1e1b1d 100644
--- a/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0004-Require-static-native-libraries-when-linking-static-.patch
@@ -19,7 +19,7 @@ diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/ba
 index e3d297e7862..974e8c0239b 100644
 --- a/src/librustc_codegen_ssa/back/link.rs
 +++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1571,9 +1571,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
+@@ -1602,9 +1602,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
      }
  }
  
@@ -30,11 +30,11 @@ index e3d297e7862..974e8c0239b 100644
  //
  // 1. The upstream crate is an rlib. In this case we *must* link in the
  // native dependency because the rlib is just an archive.
-@@ -1616,7 +1614,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
+@@ -1647,7 +1645,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
                  continue
              }
              match lib.kind {
--                NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
+-                NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
 +                NativeLibraryKind::NativeUnknown => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
@@ -43,14 +43,11 @@ index e3d297e7862..974e8c0239b 100644
 +                        && sess.crt_static()
 +                        && !sess.target.target.options.crt_static_allows_dylibs
 +                    {
-+                        cmd.link_staticlib(&name.as_str())
++                        cmd.link_staticlib(name)
 +                    } else {
-+                        cmd.link_dylib(&name.as_str())
++                        cmd.link_dylib(name)
 +                    }
 +                },
-                 NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
+                 NativeLibraryKind::NativeFramework => cmd.link_framework(name),
                  NativeLibraryKind::NativeStaticNobundle => {
                      // Link "static-nobundle" native libs only if the crate they originate from
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 88e05b3887d..af7ed0b86c6 100644
--- a/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,3 +1,5 @@
+Updated from:
+
 From e8ef432c23ea9fb70b28bea07042b33f1050569b Mon Sep 17 00:00:00 2001
 From: Samuel Holland <samuel@sholland.org>
 Date: Fri, 8 Sep 2017 22:11:14 -0500
@@ -20,10 +22,10 @@ Subject: [PATCH 05/16] Remove -nostdlib and musl_root from musl targets
  13 files changed, 4 insertions(+), 152 deletions(-)
 
 diff --git a/config.toml.example b/config.toml.example
-index c14adf8ce33..8ec8d2bbbb7 100644
+index 848147c2..2aea23d4 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -479,12 +479,6 @@
+@@ -469,12 +469,6 @@
  # only use static libraries. If unset, the target's default linkage is used.
  #crt-static = false
  
@@ -36,32 +38,11 @@ index c14adf8ce33..8ec8d2bbbb7 100644
  # The root location of the `wasm32-wasi` sysroot.
  #wasi-root = "..."
  
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index 595deb07ec8..c077dc1581e 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -145,16 +145,6 @@ fn main() {
-             cmd.arg("-Cprefer-dynamic");
-         }
- 
--        // Help the libc crate compile by assisting it in finding various
--        // sysroot native libraries.
--        if let Some(s) = env::var_os("MUSL_ROOT") {
--            if target.contains("musl") {
--                let mut root = OsString::from("native=");
--                root.push(&s);
--                root.push("/lib");
--                cmd.arg("-L").arg(&root);
--            }
--        }
-         if let Some(s) = env::var_os("WASI_ROOT") {
-             let mut root = OsString::from("native=");
-             root.push(&s);
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 400375cd201..0394ab7a8a7 100644
+index a4cb81d3..b4247e74 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -84,7 +84,7 @@ pub fn find(build: &mut Build) {
+@@ -86,7 +86,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -70,7 +51,7 @@ index 400375cd201..0394ab7a8a7 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -107,7 +107,7 @@ pub fn find(build: &mut Build) {
+@@ -109,7 +109,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -79,7 +60,7 @@ index 400375cd201..0394ab7a8a7 100644
              true
          } else {
              false
-@@ -134,8 +134,7 @@ pub fn find(build: &mut Build) {
+@@ -136,8 +136,7 @@ pub fn find(build: &mut Build) {
  fn set_compiler(cfg: &mut cc::Build,
                  compiler: Language,
                  target: Interned<String>,
@@ -89,7 +70,7 @@ index 400375cd201..0394ab7a8a7 100644
      match &*target {
          // When compiling for android we may have the NDK configured in the
          // config.toml in which case we look there. Otherwise the default
-@@ -175,26 +174,6 @@ fn set_compiler(cfg: &mut cc::Build,
+@@ -177,26 +176,6 @@ fn set_compiler(cfg: &mut cc::Build,
              }
          }
  
@@ -117,7 +98,7 @@ index 400375cd201..0394ab7a8a7 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 576267e6948..8e5de3907f6 100644
+index 6ea32edf..afdf6fcf 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
 @@ -116,20 +116,7 @@ impl Step for Std {
@@ -142,24 +123,27 @@ index 576267e6948..8e5de3907f6 100644
          for &obj in &["crt1.o"] {
              builder.copy(
                  &builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj),
-@@ -219,12 +206,6 @@ pub fn std_cargo(builder: &Builder<'_>,
+@@ -220,15 +207,6 @@ pub fn std_cargo(builder: &Builder<'_>,
              .arg("--manifest-path")
-             .arg(builder.src.join("src/libstd/Cargo.toml"));
+             .arg(builder.src.join("src/libtest/Cargo.toml"));
  
+-        // Help the libc crate compile by assisting it in finding various
+-        // sysroot native libraries.
 -        if target.contains("musl") {
 -            if let Some(p) = builder.musl_root(target) {
--                cargo.env("MUSL_ROOT", p);
+-                let root = format!("native={}/lib", p.to_str().unwrap());
+-                cargo.rustflag("-L").rustflag(&root);
 -            }
 -        }
 -
          if target.ends_with("-wasi") {
              if let Some(p) = builder.wasi_root(target) {
-                 cargo.env("WASI_ROOT", p);
+                 let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 66f504ea924..5bb211501b1 100644
+index 52b5cd88..cc191271 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -133,8 +133,6 @@ pub struct Config {
+@@ -131,8 +131,6 @@ pub struct Config {
      pub print_step_timings: bool,
      pub missing_tools: bool,
  
@@ -168,7 +152,7 @@ index 66f504ea924..5bb211501b1 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -169,7 +167,6 @@ pub struct Target {
+@@ -167,7 +165,6 @@ pub struct Target {
      pub linker: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub crt_static: Option<bool>,
@@ -176,7 +160,7 @@ index 66f504ea924..5bb211501b1 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -307,7 +304,6 @@ struct Rust {
+@@ -305,7 +302,6 @@ struct Rust {
      backtrace: Option<bool>,
      default_linker: Option<String>,
      channel: Option<String>,
@@ -184,7 +168,7 @@ index 66f504ea924..5bb211501b1 100644
      rpath: Option<bool>,
      optimize_tests: Option<bool>,
      codegen_tests: Option<bool>,
-@@ -346,7 +342,6 @@ struct TomlTarget {
+@@ -342,7 +338,6 @@ struct TomlTarget {
      linker: Option<String>,
      android_ndk: Option<String>,
      crt_static: Option<bool>,
@@ -192,15 +176,15 @@ index 66f504ea924..5bb211501b1 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
  }
-@@ -569,7 +564,6 @@ impl Config {
+@@ -562,7 +557,6 @@ impl Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker.clone();
 -            config.musl_root = rust.musl_root.clone().map(PathBuf::from);
              config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
-             set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
+             set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -607,7 +601,6 @@ impl Config {
+@@ -600,7 +594,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
                  target.linker = cfg.linker.clone().map(PathBuf::from);
                  target.crt_static = cfg.crt_static.clone();
@@ -209,7 +193,7 @@ index 66f504ea924..5bb211501b1 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
  
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 907983d43ad..e91f6fcbe4b 100755
+index 346f0cb2..80409781 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -110,30 +110,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -244,10 +228,10 @@ index 907983d43ad..e91f6fcbe4b 100755
    "rootfs in qemu testing, you probably don't want to use this")
  v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 867df81d972..4fb57aa6db6 100644
+index d292609f..ff5f7e16 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -847,14 +847,6 @@ impl Build {
+@@ -835,14 +835,6 @@ impl Build {
          }
      }
  
@@ -263,10 +247,10 @@ index 867df81d972..4fb57aa6db6 100644
      fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
          self.config.target_config.get(&target)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index dc65fb9b797..060ba6d9e42 100644
+index bffe748f..3b109548 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -176,34 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -187,30 +187,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -285,10 +269,6 @@ index dc65fb9b797..060ba6d9e42 100644
 -                        panic!("couldn't find libc.a in musl dir: {}",
 -                               root.join("lib").display());
 -                    }
--                    if fs::metadata(root.join("lib/libunwind.a")).is_err() {
--                        panic!("couldn't find libunwind.a in musl dir: {}",
--                               root.join("lib").display());
--                    }
 -                }
 -                None => {
 -                    panic!("when targeting MUSL either the rust.musl-root \
@@ -302,7 +282,7 @@ index dc65fb9b797..060ba6d9e42 100644
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
 diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index e294e63982d..58ae91a96aa 100644
+index 17fecb3b..18732066 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
 @@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
@@ -334,6 +314,3 @@ index e294e63982d..58ae91a96aa 100644
      // These targets statically link libc by default
      base.crt_static_default = true;
      // These targets allow the user to choose between static and dynamic linking.
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
index 2f109444886..d32841103a1 100644
--- a/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ b/srcpkgs/rust/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -1,3 +1,5 @@
+Additions for build.rs by q66, necessary for our musl setup.
+
 From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001
 From: Samuel Holland <samuel@sholland.org>
 Date: Sat, 9 Sep 2017 00:14:16 -0500
@@ -19,6 +21,41 @@ index 9182e349b19..0377fbb58fc 100644
 +#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
  #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
  extern {}
--- 
-2.21.0
-
+diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
+index f24d957..28828e5 100644
+--- a/src/libunwind/build.rs
++++ b/src/libunwind/build.rs
+@@ -5,15 +5,11 @@ fn main() {
+     let target = env::var("TARGET").expect("TARGET was not set");
+ 
+     if cfg!(feature = "llvm-libunwind") &&
+-        ((target.contains("linux") && !target.contains("musl")) ||
+-         target.contains("fuchsia")) {
++        (target.contains("linux") || target.contains("fuchsia")) {
+         // Build the unwinding from libunwind C/C++ source code.
+         llvm_libunwind::compile();
+     } else if target.contains("linux") {
+-        if target.contains("musl") {
+-            // linking for musl is handled in lib.rs
+-            llvm_libunwind::compile();
+-        } else if !target.contains("android") {
++        if !target.contains("android") {
+             println!("cargo:rustc-link-lib=gcc_s");
+         }
+     } else if target.contains("freebsd") {
+@@ -99,15 +95,6 @@ mod llvm_libunwind {
+             cfg.file(root.join("src").join(src));
+         }
+ 
+-        if target_env == "musl" {
+-            // use the same C compiler command to compile C++ code so we do not need to setup the
+-            // C++ compiler env variables on the builders
+-            cfg.cpp(false);
+-            // linking for musl is handled in lib.rs
+-            cfg.cargo_metadata(false);
+-            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
+-        }
+-
+         cfg.compile("unwind");
+     }
+ }
diff --git a/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch b/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
deleted file mode 100644
index 9ca4d99000c..00000000000
--- a/srcpkgs/rust/patches/0009-compiletest-Match-suffixed-environments.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0b28aa018f3f64913101495ce9806d356230856e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:10:10 -0500
-Subject: [PATCH 09/16] compiletest: Match suffixed environments
-
----
- src/tools/compiletest/src/header.rs | 2 +-
- src/tools/compiletest/src/util.rs   | 8 ++++++--
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
-index 52f777db2da..4bf3c1a8527 100644
---- a/src/tools/compiletest/src/header.rs
-+++ b/src/tools/compiletest/src/header.rs
-@@ -820,10 +820,10 @@ impl Config {
- 
-             if name == "test" ||
-                 util::matches_os(&self.target, name) ||             // target
-+                util::matches_env(&self.target, name) ||            // env
-                 name == util::get_arch(&self.target) ||             // architecture
-                 name == util::get_pointer_width(&self.target) ||    // pointer width
-                 name == self.stage_id.split('-').next().unwrap() || // stage
--                Some(name) == util::get_env(&self.target) ||        // env
-                 (self.target != self.host && name == "cross-compile") ||
-                 match self.compare_mode {
-                     Some(CompareMode::Nll) => name == "compare-mode-nll",
-diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 8caf5ca00f5..d23f4edc55d 100644
---- a/src/tools/compiletest/src/util.rs
-+++ b/src/tools/compiletest/src/util.rs
-@@ -101,8 +101,12 @@ pub fn get_arch(triple: &str) -> &'static str {
-     panic!("Cannot determine Architecture from triple");
- }
- 
--pub fn get_env(triple: &str) -> Option<&str> {
--    triple.split('-').nth(3)
-+pub fn matches_env(triple: &str, name: &str) -> bool {
-+    if let Some(env) = triple.split('-').nth(3) {
-+        env.starts_with(name)
-+    } else {
-+        false
-+    }
- }
- 
- pub fn get_pointer_width(triple: &str) -> &'static str {
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch b/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
deleted file mode 100644
index 2e2111edbbc..00000000000
--- a/srcpkgs/rust/patches/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From e6a01c436377109808cac2d49ec30968a02b561d Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:09:15 -0500
-Subject: [PATCH 10/16] test/c-variadic: Fix patterns on powerpc64
-
----
- src/test/codegen/c-variadic.rs | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/src/test/codegen/c-variadic.rs b/src/test/codegen/c-variadic.rs
-index bb90a9653f5..6ef77ca483f 100644
---- a/src/test/codegen/c-variadic.rs
-+++ b/src/test/codegen/c-variadic.rs
-@@ -14,13 +14,13 @@ extern "C" {
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_0() {
-     // Ensure that we correctly call foreign C-variadic functions.
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM:i32( signext)?]] 0)
-     foreign_c_variadic_0(0);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42)
-     foreign_c_variadic_0(0, 42i32);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
-     foreign_c_variadic_0(0, 42i32, 1024i32);
--    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0)
-+    // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
-     foreign_c_variadic_0(0, 42i32, 1024i32, 0i32);
- }
- 
-@@ -34,18 +34,18 @@ pub unsafe extern "C" fn use_foreign_c_variadic_1_0(ap: VaList) {
- 
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_1(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 42)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 42)
-     foreign_c_variadic_1(ap, 42i32);
- }
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_2(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42)
-     foreign_c_variadic_1(ap, 2i32, 42i32);
- }
- 
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_3(ap: VaList) {
--    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42, i32 0)
-+    // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42, [[PARAM]] 0)
-     foreign_c_variadic_1(ap, 2i32, 42i32, 0i32);
- }
- 
-@@ -64,12 +64,12 @@ pub unsafe extern "C" fn c_variadic(n: i32, mut ap: ...) -> i32 {
- // Ensure that we generate the correct `call` signature when calling a Rust
- // defined C-variadic.
- pub unsafe fn test_c_variadic_call() {
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0)
-+    // CHECK: call [[RET:(signext )?i32]] (i32, ...) @c_variadic([[PARAM]] 0)
-     c_variadic(0);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42)
-     c_variadic(0, 42i32);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
-     c_variadic(0, 42i32, 1024i32);
--    // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024, i32 0)
-+    // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
-     c_variadic(0, 42i32, 1024i32, 0i32);
- }
--- 
-2.21.0
-
diff --git a/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
index 47e9173a907..632717f56bf 100644
--- a/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0014-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,27 +1,20 @@
-From 8e160daedd1a8c928024db648c2f851cddbbd000 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 14/16] Link stage 2 tools dynamically to libstd
+Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
+env var was removed and replaced with the following logic in builder.rs.
 
----
- src/bootstrap/tool.rs | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+The idea for this patch is to link stage2 tools dynamically as these will
+be distributed (if built). Intermediate tools from previous stages will
+be statically linked for convenience.
 
-diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
-index bd77f7a91d9..70477b44032 100644
---- a/src/bootstrap/tool.rs
-+++ b/src/bootstrap/tool.rs
-@@ -210,7 +210,9 @@ pub fn prepare_tool_cargo(
- 
-     // We don't want to build tools dynamically as they'll be running across
-     // stages and such and it's just easier if they're not dynamically linked.
--    cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+    if compiler.stage < 2 {
-+        cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+    }
- 
-     if source_type == SourceType::Submodule {
-         cargo.env("RUSTC_EXTERNAL_TOOL", "1");
--- 
-2.21.0
+@q66
 
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -1228,6 +1228,8 @@ impl<'a> Builder<'a> {
+         // linking all deps statically into the dylib.
+         if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
+             rustflags.arg("-Cprefer-dynamic");
++        } else if stage >= 2 {
++            rustflags.arg("-Cprefer-dynamic");
+         }
+ 
+         Cargo {
diff --git a/srcpkgs/rust/patches/0091-bootstrap.patch b/srcpkgs/rust/patches/0091-bootstrap.patch
deleted file mode 100644
index cd8c33e3f34..00000000000
--- a/srcpkgs/rust/patches/0091-bootstrap.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Rust 1.38 can't bootstrap itself. It has some ridiculous warnings enabled
-by default which break this (even though the compiler obviously needs to
-be able to compile itself just fine, that's what stage1 is all about).
-
-diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs
-index bd1a87c..138b7f4 100644
---- a/src/bootstrap/bin/main.rs
-+++ b/src/bootstrap/bin/main.rs
-@@ -5,9 +5,6 @@
- //! parent directory, and otherwise documentation can be found throughout the `build`
- //! directory in each respective module.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- 
- use bootstrap::{Config, Build};
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index 81e7e46..d3d84ca 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -15,9 +15,6 @@
- //! switching compilers for the bootstrap and for build scripts will probably
- //! never get replaced.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- use std::ffi::OsString;
- use std::io;
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index 184c9b1..2a8397a 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -2,9 +2,6 @@
- //!
- //! See comments in `src/bootstrap/rustc.rs` for more information.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::env;
- use std::process::Command;
- use std::path::PathBuf;
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 76cc0dd..5eeed7c 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -103,9 +103,6 @@
- //! More documentation can be found in each respective module below, and you can
- //! also check out the `src/bootstrap/README.md` file for more information.
- 
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- #![feature(core_intrinsics)]
- #![feature(drain_filter)]
- 
-diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs
-index a1aa189..f3f5913 100644
---- a/src/build_helper/lib.rs
-+++ b/src/build_helper/lib.rs
-@@ -1,6 +1,3 @@
--// NO-RUSTC-WRAPPER
--#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
--
- use std::fs::File;
- use std::path::{Path, PathBuf};
- use std::process::{Command, Stdio};
diff --git a/srcpkgs/rust/patches/0099-set-piclevel.patch b/srcpkgs/rust/patches/0099-set-piclevel.patch
new file mode 100644
index 00000000000..5582747b1e9
--- /dev/null
+++ b/srcpkgs/rust/patches/0099-set-piclevel.patch
@@ -0,0 +1,56 @@
+From 194307936110470487c41637684d4b09b3516af5 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 Nov 2019 10:52:00 -0600
+Subject: [PATCH] Configure LLVM module PIC level
+
+As of LLVM 9, this is required for 32-bit PowerPC to properly generate
+PLT references. Previously, only BigPIC was supported; now LLVM supports
+both BigPIC and SmallPIC, and there is no default value provided.
+---
+ src/librustc_codegen_llvm/context.rs  | 4 ++++
+ src/librustc_codegen_llvm/llvm/ffi.rs | 1 +
+ src/rustllvm/PassWrapper.cpp          | 4 ++++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
+index 2da938771721..4a40349cb73e 100644
+--- a/src/librustc_codegen_llvm/context.rs
++++ b/src/librustc_codegen_llvm/context.rs
+@@ -203,6 +203,10 @@ pub unsafe fn create_module(
+     let llvm_target = SmallCStr::new(&sess.target.target.llvm_target);
+     llvm::LLVMRustSetNormalizedTarget(llmod, llvm_target.as_ptr());
+ 
++    if get_reloc_model(sess) == llvm::RelocMode::PIC {
++        llvm::LLVMRustSetModulePICLevel(llmod);
++    }
++
+     if is_pie_binary(sess) {
+         llvm::LLVMRustSetModulePIELevel(llmod);
+     }
+diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
+index c69942ef3f2d..7f7b5b22d9af 100644
+--- a/src/librustc_codegen_llvm/llvm/ffi.rs
++++ b/src/librustc_codegen_llvm/llvm/ffi.rs
+@@ -1805,6 +1805,7 @@ extern "C" {
+ 
+     pub fn LLVMRustSetComdat(M: &'a Module, V: &'a Value, Name: *const c_char);
+     pub fn LLVMRustUnsetComdat(V: &Value);
++    pub fn LLVMRustSetModulePICLevel(M: &Module);
+     pub fn LLVMRustSetModulePIELevel(M: &Module);
+     pub fn LLVMRustModuleBufferCreate(M: &Module) -> &'static mut ModuleBuffer;
+     pub fn LLVMRustModuleBufferPtr(p: &ModuleBuffer) -> *const u8;
+diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
+index 0cda3465dc09..4c5bc20b86db 100644
+--- a/src/rustllvm/PassWrapper.cpp
++++ b/src/rustllvm/PassWrapper.cpp
+@@ -754,6 +754,10 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
+   unwrap(Module)->setDataLayout(Target->createDataLayout());
+ }
+ 
++extern "C" void LLVMRustSetModulePICLevel(LLVMModuleRef M) {
++  unwrap(M)->setPICLevel(PICLevel::Level::BigPIC);
++}
++
+ extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) {
+   unwrap(M)->setPIELevel(PIELevel::Level::Large);
+ }
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 2f5e5def714..698a5853d3f 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -1,7 +1,7 @@
 # Template file for 'rust'
 # partially adapted from Alpine/Adélie's Rust APKBUILD
 pkgname=rust
-version=1.38.0
+version=1.39.0
 revision=1
 _rust_dist_version=1.38.0
 _cargo_dist_version=0.39.0
@@ -9,15 +9,14 @@ _cargo_dist_version=0.39.0
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3"
-# using llvm9 results in broken executables for some targets
-makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm8"
+makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm"
 depends="rust-std"
 short_desc="Safe, concurrent, practical systems language"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=644263ca7c7106f8ee8fcde6bb16910d246b30668a74be20b8c7e0e9f4a52d80
+checksum=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -26,7 +25,7 @@ build_options="static_llvm"
 _bootstrap_dir="stage0-bootstrap"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" cargo llvm8"
+	hostmakedepends+=" cargo llvm"
 	# These are required for building the buildhost's stage0/1
 	hostmakedepends+=" libffi-devel libxml2-devel ncurses-devel zlib-devel"
 else

From 17e30ece9907592ae83539fdd26595d62de50ee0 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 13:47:33 +0100
Subject: [PATCH 2/8] cargo: update to 0.40.0

---
 srcpkgs/cargo/template | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 584ca07efe2..008ba9e3bde 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.39.0
+version=0.40.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust
@@ -11,10 +11,11 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
+_libgit2_ver=0.9.1
 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/rust-lang/git2-rs/archive/libgit2-sys-0.8.2.tar.gz"
-checksum="1fade63d5c09eab6fa234a1fdf64693ccf1b63398a316ad27edeb1f76ee4a57e
- c6597bcdc2be7a2fd70c1bb8fdc75883ca5df6aea33f0354c5a8124eacc0938b"
+ https://github.com/rust-lang/git2-rs/archive/libgit2-sys-${_libgit2_ver}.tar.gz"
+checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d
+ 81e20fa9a0f6ea3e3a0e6458148f3dea4a89af87d34128d4375f2b7fd661a49c"
 _cargo_dist_version=0.39.0
 build_options="static"
 
@@ -79,8 +80,8 @@ post_extract() {
 		cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo
 	fi
 
-	# need this for the patch to work
-	cp -R ${XBPS_BUILDDIR}/git2-rs-libgit2-sys-0.8.2/libgit2-sys .
+	mv ${XBPS_BUILDDIR}/git2-rs-libgit2-sys-${_libgit2_ver} .
+	mv git2-rs-libgit2-sys-${_libgit2_ver}/libgit2-sys .
 }
 
 post_patch() {
@@ -110,6 +111,9 @@ do_build() {
 		cargo="./cargo"
 	fi
 
+	# gotta pin out libgit2-sys at the version
+	$cargo update
+	$cargo update --package libgit2-sys --precise ${_libgit2_ver}
 	$cargo build --release $(vopt_if static --features="all-static")
 }
 

From 5304cc09d1c8c2d7da883fe648eac22e80356f38 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 20:59:51 +0100
Subject: [PATCH 3/8] rust: nocross for now

[ci skip]
---
 srcpkgs/rust/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 698a5853d3f..4ee5a398d07 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -19,6 +19,7 @@ distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
 checksum=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357
 lib32disabled=yes
 patch_args="-Np1"
+nocross=yes
 
 build_options="static_llvm"
 

From c05781619e50718733c0c29c76a576803105e071 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 8 Nov 2019 21:00:41 +0100
Subject: [PATCH 4/8] cargo: nocross for now

[ci skip]
---
 srcpkgs/cargo/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 008ba9e3bde..123b933dee7 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -18,6 +18,7 @@ checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d
  81e20fa9a0f6ea3e3a0e6458148f3dea4a89af87d34128d4375f2b7fd661a49c"
 _cargo_dist_version=0.39.0
 build_options="static"
+nocross=yes
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" cargo"

From 18276a1b1e5d92768002f308aa209a28839c238d Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 9 Nov 2019 00:49:26 +0100
Subject: [PATCH 5/8] firefox: add patch for rust 1.39

---
 .../patches/firefox-70.0.1-rust-1.39+.patch   | 165 ++++++++++++++++++
 1 file changed, 165 insertions(+)
 create mode 100644 srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch

diff --git a/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch b/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch
new file mode 100644
index 00000000000..d4c9fe3a941
--- /dev/null
+++ b/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch
@@ -0,0 +1,165 @@
+Source: Gentoo
+
+Based on https://github.com/rust-lang/rust/issues/64710
+
+--- third_party/rust/bindgen/.cargo-checksum.json.orig
++++ third_party/rust/bindgen/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"a970d1a9e47f029fe3e3ce43ae4292054ad60c4490e035b86b669fcf32015624","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","csmith-fuzzing/README.md":"7107b70fedb0c0a0cadb3c439a49c1bd0119a6d38dc63b1aecc74d1942256ef2","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"0009b8b6e3f6c33ec2776ec4cb8de2625ae8be22c9f0433c39b06bdd9fc7db4d","src/codegen/bitfield_unit.rs":"87be2d7f7774327a1608c2c4d64df869e17fb34b7efdacb4030b6794d98e40f3","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"aa0daff2061c6de31acfbd113190889e0f7ca2d2b8d4f46740bfd5832c33e4d2","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"ad116e2af755219bd556e8ee00ca48562f64a161d0b2c94846ae01297446ea0d","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"82511f1bb8cbd04d98f57b000903b0264237962af93a72a58220437213eba1ef","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"5788372d27bdbaaf0454bc17be31a5480918bc41a8a1c4832e8c61185c07f9cd","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"b73865b6689d4f3546edd91909a47c329c4ae630ea97715d29bc683ae1dc17ad","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"78e245835efcd22b5cc878a8a7031171116c708408bdb48b0c9284a067041e56","src/ir/context.rs":"8fd64654343295e0e4a43efe5db6f64315dcd50a5015c3d86e90aae992e2fa9f","src/ir/derive.rs":"34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"7658cf68c00b1732dfa599c2d6b6a93a82de8401142591c3afe5fcb27d901a66","src/ir/function.rs":"c2feb2e26d47aa96a74af9912ada26be077e2b0c36d46fa10167da7109590500","src/ir/int.rs":"5b8d5bcedb04f39dc2d7e571bc04114b1f1e09cf294afe944c2e7879451c4378","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"e6771c8102b9f01b0c4b664bf1151b4773b599634a83895376ce122ca9f74f8b","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"a07ef7a3d099493555ae5a58b7b4bf9106a978e38a23b5ff445a83b92727ab62","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"8c96cd2a051e3f09b1b87b75cd9ed77e82e889c8309ebd3e4bc782960cf63e58","src/options.rs":"5b309b225cc51e665bd42ed3e7965a7cd73d984e4455a2d76987fc42ab271ff8","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"18270cdd7065ec045a6bb4bdcd5144d14a78b3aedb3bc5111e688773ac8b9ad0"}
+\ No newline at end of file
++{"files":{},"package":"18270cdd7065ec045a6bb4bdcd5144d14a78b3aedb3bc5111e688773ac8b9ad0"}
+--- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs.orig
++++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
+@@ -9,37 +9,22 @@ use std::ops;
+ use {HashMap, Entry};
+ 
+ /// The result of the `HasVtableAnalysis` for an individual item.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum HasVtableResult {
+-    /// The item has a vtable, but the actual vtable pointer is in a base
+-    /// member.
+-    BaseHasVtable,
++    /// The item does not have a vtable pointer.
++    No,
+ 
+     /// The item has a vtable and the actual vtable pointer is within this item.
+     SelfHasVtable,
+ 
+-    /// The item does not have a vtable pointer.
+-    No
++    /// The item has a vtable, but the actual vtable pointer is in a base
++    /// member.
++    BaseHasVtable,
+ }
+ 
+ impl Default for HasVtableResult {
+     fn default() -> Self {
+         HasVtableResult::No
+-    }
+-}
+-
+-impl cmp::PartialOrd for HasVtableResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::HasVtableResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (BaseHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, BaseHasVtable) => Some(cmp::Ordering::Less),
+-            (SelfHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, SelfHasVtable) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+     }
+ }
+ 
+--- third_party/rust/bindgen/src/ir/analysis/sizedness.rs.orig
++++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs
+@@ -22,13 +22,14 @@ use {HashMap, Entry};
+ ///
+ /// We initially assume that all types are `ZeroSized` and then update our
+ /// understanding as we learn more about each type.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum SizednessResult {
+-    /// Has some size that is known to be greater than zero. That doesn't mean
+-    /// it has a static size, but it is not zero sized for sure. In other words,
+-    /// it might contain an incomplete array or some other dynamically sized
+-    /// type.
+-    NonZeroSized,
++    /// The type is zero-sized.
++    ///
++    /// This means that if it is a C++ type, and is not being used as a base
++    /// member, then we must add an `_address` byte to enforce the
++    /// unique-address-per-distinct-object-instance rule.
++    ZeroSized,
+ 
+     /// Whether this type is zero-sized or not depends on whether a type
+     /// parameter is zero-sized or not.
+@@ -52,32 +53,16 @@ pub enum SizednessResult {
+     /// https://github.com/rust-lang/rust-bindgen/issues/586
+     DependsOnTypeParam,
+ 
+-    /// The type is zero-sized.
+-    ///
+-    /// This means that if it is a C++ type, and is not being used as a base
+-    /// member, then we must add an `_address` byte to enforce the
+-    /// unique-address-per-distinct-object-instance rule.
+-    ZeroSized,
++    /// Has some size that is known to be greater than zero. That doesn't mean
++    /// it has a static size, but it is not zero sized for sure. In other words,
++    /// it might contain an incomplete array or some other dynamically sized
++    /// type.
++    NonZeroSized,
+ }
+ 
+ impl Default for SizednessResult {
+     fn default() -> Self {
+         SizednessResult::ZeroSized
+-    }
+-}
+-
+-impl cmp::PartialOrd for SizednessResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::SizednessResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (NonZeroSized, _) => Some(cmp::Ordering::Greater),
+-            (_, NonZeroSized) => Some(cmp::Ordering::Less),
+-            (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater),
+-            (_, DependsOnTypeParam) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+     }
+ }
+ 
+--- third_party/rust/bindgen/src/ir/derive.rs.orig
++++ third_party/rust/bindgen/src/ir/derive.rs
+@@ -92,10 +92,10 @@ pub trait CanDeriveOrd {
+ ///
+ /// Initially we assume that we can derive trait for all types and then
+ /// update our understanding as we learn more about each type.
+-#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)]
++#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum CanDerive {
+-    /// No, we cannot.
+-    No,
++    /// Yes, we can derive automatically.
++    Yes,
+ 
+     /// The only thing that stops us from automatically deriving is that
+     /// array with more than maximum number of elements is used.
+@@ -103,29 +103,13 @@ pub enum CanDerive {
+     /// This means we probably can "manually" implement such trait.
+     Manually,
+ 
+-    /// Yes, we can derive automatically.
+-    Yes,
++    /// No, we cannot.
++    No,
+ }
+ 
+ impl Default for CanDerive {
+     fn default() -> CanDerive {
+         CanDerive::Yes
+-    }
+-}
+-
+-impl cmp::PartialOrd for CanDerive {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::CanDerive::*;
+-
+-        let ordering = match (*self, *rhs) {
+-            (x, y) if x == y => cmp::Ordering::Equal,
+-            (No, _) => cmp::Ordering::Greater,
+-            (_, No) => cmp::Ordering::Less,
+-            (Manually, _) => cmp::Ordering::Greater,
+-            (_, Manually) => cmp::Ordering::Less,
+-            _ => unreachable!()
+-        };
+-        Some(ordering)
+     }
+ }
+ 

From c1c4b6df286fbeb826be9906038ffb0088367b84 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 9 Nov 2019 00:49:38 +0100
Subject: [PATCH 6/8] firefox-esr: add patch for rust 1.39

---
 .../patches/firefox-68.2.0-rust-1.39+.patch   | 172 ++++++++++++++++++
 1 file changed, 172 insertions(+)
 create mode 100644 srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch

diff --git a/srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch b/srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch
new file mode 100644
index 00000000000..9494776e04f
--- /dev/null
+++ b/srcpkgs/firefox-esr/patches/firefox-68.2.0-rust-1.39+.patch
@@ -0,0 +1,172 @@
+Source: Gentoo
+
+Based on https://github.com/rust-lang/rust/issues/64710
+
+--- third_party/rust/bindgen/.cargo-checksum.json
++++ third_party/rust/bindgen/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"5788372d27bdbaaf0454bc17be31a5480918bc41a8a1c4832e8c61185c07f9cd","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"8dc10043d872e68e660ef96edca4d9733f95be45cdad4893462fa929b335014f","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"8c92a52c0f859c7bec7bfbc36b9d18f904baab0c8c9dc1b3e7af34de1a0b0da4","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"71f1a37f75b971ea5b0d8457473cc410947dbf706cb6d2c0338916910b78a675","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
+--- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
++++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
+@@ -9,17 +9,17 @@ use std::ops;
+ use {HashMap, Entry};
+ 
+ /// The result of the `HasVtableAnalysis` for an individual item.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum HasVtableResult {
+-    /// The item has a vtable, but the actual vtable pointer is in a base
+-    /// member.
+-    BaseHasVtable,
++    /// The item does not have a vtable pointer.
++    No,
+ 
+     /// The item has a vtable and the actual vtable pointer is within this item.
+     SelfHasVtable,
+ 
+-    /// The item does not have a vtable pointer.
+-    No
++    /// The item has a vtable, but the actual vtable pointer is in a base
++    /// member.
++    BaseHasVtable,
+ }
+ 
+ impl Default for HasVtableResult {
+@@ -28,21 +28,6 @@ impl Default for HasVtableResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for HasVtableResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::HasVtableResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (BaseHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, BaseHasVtable) => Some(cmp::Ordering::Less),
+-            (SelfHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, SelfHasVtable) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl HasVtableResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/analysis/sizedness.rs
++++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs
+@@ -22,13 +22,14 @@ use {HashMap, Entry};
+ ///
+ /// We initially assume that all types are `ZeroSized` and then update our
+ /// understanding as we learn more about each type.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum SizednessResult {
+-    /// Has some size that is known to be greater than zero. That doesn't mean
+-    /// it has a static size, but it is not zero sized for sure. In other words,
+-    /// it might contain an incomplete array or some other dynamically sized
+-    /// type.
+-    NonZeroSized,
++    /// The type is zero-sized.
++    ///
++    /// This means that if it is a C++ type, and is not being used as a base
++    /// member, then we must add an `_address` byte to enforce the
++    /// unique-address-per-distinct-object-instance rule.
++    ZeroSized,
+ 
+     /// Whether this type is zero-sized or not depends on whether a type
+     /// parameter is zero-sized or not.
+@@ -52,12 +53,11 @@ pub enum SizednessResult {
+     /// https://github.com/rust-lang-nursery/rust-bindgen/issues/586
+     DependsOnTypeParam,
+ 
+-    /// The type is zero-sized.
+-    ///
+-    /// This means that if it is a C++ type, and is not being used as a base
+-    /// member, then we must add an `_address` byte to enforce the
+-    /// unique-address-per-distinct-object-instance rule.
+-    ZeroSized,
++    /// Has some size that is known to be greater than zero. That doesn't mean
++    /// it has a static size, but it is not zero sized for sure. In other words,
++    /// it might contain an incomplete array or some other dynamically sized
++    /// type.
++    NonZeroSized,
+ }
+ 
+ impl Default for SizednessResult {
+@@ -66,21 +66,6 @@ impl Default for SizednessResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for SizednessResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::SizednessResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (NonZeroSized, _) => Some(cmp::Ordering::Greater),
+-            (_, NonZeroSized) => Some(cmp::Ordering::Less),
+-            (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater),
+-            (_, DependsOnTypeParam) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl SizednessResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/derive.rs
++++ third_party/rust/bindgen/src/ir/derive.rs
+@@ -92,10 +92,10 @@ pub trait CanDeriveOrd {
+ ///
+ /// Initially we assume that we can derive trait for all types and then
+ /// update our understanding as we learn more about each type.
+-#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)]
++#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum CanDerive {
+-    /// No, we cannot.
+-    No,
++    /// Yes, we can derive automatically.
++    Yes,
+ 
+     /// The only thing that stops us from automatically deriving is that
+     /// array with more than maximum number of elements is used.
+@@ -103,8 +103,8 @@ pub enum CanDerive {
+     /// This means we probably can "manually" implement such trait.
+     Manually,
+ 
+-    /// Yes, we can derive automatically.
+-    Yes,
++    /// No, we cannot.
++    No,
+ }
+ 
+ impl Default for CanDerive {
+@@ -113,22 +113,6 @@ impl Default for CanDerive {
+     }
+ }
+ 
+-impl cmp::PartialOrd for CanDerive {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::CanDerive::*;
+-
+-        let ordering = match (*self, *rhs) {
+-            (x, y) if x == y => cmp::Ordering::Equal,
+-            (No, _) => cmp::Ordering::Greater,
+-            (_, No) => cmp::Ordering::Less,
+-            (Manually, _) => cmp::Ordering::Greater,
+-            (_, Manually) => cmp::Ordering::Less,
+-            _ => unreachable!()
+-        };
+-        Some(ordering)
+-    }
+-}
+-
+ impl CanDerive {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {

From 815d3f5239d63b3c95a9609fbddca3dbc3ccad09 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 9 Nov 2019 00:49:52 +0100
Subject: [PATCH 7/8] thunderbird: add patch for rust 1.39

[ci skip]
---
 .../thunderbird-68.2.2-rust-1.39+.patch       | 172 ++++++++++++++++++
 1 file changed, 172 insertions(+)
 create mode 100644 srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch

diff --git a/srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch b/srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch
new file mode 100644
index 00000000000..9494776e04f
--- /dev/null
+++ b/srcpkgs/thunderbird/patches/thunderbird-68.2.2-rust-1.39+.patch
@@ -0,0 +1,172 @@
+Source: Gentoo
+
+Based on https://github.com/rust-lang/rust/issues/64710
+
+--- third_party/rust/bindgen/.cargo-checksum.json
++++ third_party/rust/bindgen/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"5788372d27bdbaaf0454bc17be31a5480918bc41a8a1c4832e8c61185c07f9cd","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"8dc10043d872e68e660ef96edca4d9733f95be45cdad4893462fa929b335014f","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"9af635e7bad9021a49742a312faf6178b757dbd48aabc998931d6f491f14c179","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"e9203eb5a1b432efebafcd011896e35e8c9145037bf99e7bb3709dc1b8e8e783","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"fbd23e68dd51ccaddeb9761394d5df2db49baded0e2dccf6bbc52a2d6de502eb","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"238d989e13b7556e5d120a2bfe85b43332fba56cbe8df886d4c32e650fff1247","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"c5fd7149f4a3b41fd4f89ade08505170942f4bc791bcb6a34fdddd3ae61856f8","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"8c92a52c0f859c7bec7bfbc36b9d18f904baab0c8c9dc1b3e7af34de1a0b0da4","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"71f1a37f75b971ea5b0d8457473cc410947dbf706cb6d2c0338916910b78a675","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"ca439407faefbe3a198246f0a1dbdf4e40307e45eaaad317e85d1aab37bb31fc","src/ir/context.rs":"599226eb04d337a1b1b13af91af91bdb02dbd5f26f274cbc0ebc4489eb144fc0","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"2d41d9df19f42b0c383f338be4c026c005853a8d1caf5f3e5a2f3a8dad202232","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"952fb04cd6a71a2bca5c509aecacb42a1de0cae75824941541a38dc589f0993a","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"d5c8b404c515d30fc2d78b28eb84cff6b256f1f1e2dbd6aca280529bb2af6879","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"041d635c8f6712ca32676a68f06d0245faed5577d9513786e058540ea2a69a7f","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"6bd7710ac8399ae1ebe1e3aac7c9047c4f39f2c94b33c997f482f49e96991f7c"}
+\ No newline at end of file
+--- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
++++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
+@@ -9,17 +9,17 @@ use std::ops;
+ use {HashMap, Entry};
+ 
+ /// The result of the `HasVtableAnalysis` for an individual item.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum HasVtableResult {
+-    /// The item has a vtable, but the actual vtable pointer is in a base
+-    /// member.
+-    BaseHasVtable,
++    /// The item does not have a vtable pointer.
++    No,
+ 
+     /// The item has a vtable and the actual vtable pointer is within this item.
+     SelfHasVtable,
+ 
+-    /// The item does not have a vtable pointer.
+-    No
++    /// The item has a vtable, but the actual vtable pointer is in a base
++    /// member.
++    BaseHasVtable,
+ }
+ 
+ impl Default for HasVtableResult {
+@@ -28,21 +28,6 @@ impl Default for HasVtableResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for HasVtableResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::HasVtableResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (BaseHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, BaseHasVtable) => Some(cmp::Ordering::Less),
+-            (SelfHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, SelfHasVtable) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl HasVtableResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/analysis/sizedness.rs
++++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs
+@@ -22,13 +22,14 @@ use {HashMap, Entry};
+ ///
+ /// We initially assume that all types are `ZeroSized` and then update our
+ /// understanding as we learn more about each type.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum SizednessResult {
+-    /// Has some size that is known to be greater than zero. That doesn't mean
+-    /// it has a static size, but it is not zero sized for sure. In other words,
+-    /// it might contain an incomplete array or some other dynamically sized
+-    /// type.
+-    NonZeroSized,
++    /// The type is zero-sized.
++    ///
++    /// This means that if it is a C++ type, and is not being used as a base
++    /// member, then we must add an `_address` byte to enforce the
++    /// unique-address-per-distinct-object-instance rule.
++    ZeroSized,
+ 
+     /// Whether this type is zero-sized or not depends on whether a type
+     /// parameter is zero-sized or not.
+@@ -52,12 +53,11 @@ pub enum SizednessResult {
+     /// https://github.com/rust-lang-nursery/rust-bindgen/issues/586
+     DependsOnTypeParam,
+ 
+-    /// The type is zero-sized.
+-    ///
+-    /// This means that if it is a C++ type, and is not being used as a base
+-    /// member, then we must add an `_address` byte to enforce the
+-    /// unique-address-per-distinct-object-instance rule.
+-    ZeroSized,
++    /// Has some size that is known to be greater than zero. That doesn't mean
++    /// it has a static size, but it is not zero sized for sure. In other words,
++    /// it might contain an incomplete array or some other dynamically sized
++    /// type.
++    NonZeroSized,
+ }
+ 
+ impl Default for SizednessResult {
+@@ -66,21 +66,6 @@ impl Default for SizednessResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for SizednessResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::SizednessResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (NonZeroSized, _) => Some(cmp::Ordering::Greater),
+-            (_, NonZeroSized) => Some(cmp::Ordering::Less),
+-            (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater),
+-            (_, DependsOnTypeParam) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl SizednessResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/derive.rs
++++ third_party/rust/bindgen/src/ir/derive.rs
+@@ -92,10 +92,10 @@ pub trait CanDeriveOrd {
+ ///
+ /// Initially we assume that we can derive trait for all types and then
+ /// update our understanding as we learn more about each type.
+-#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)]
++#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum CanDerive {
+-    /// No, we cannot.
+-    No,
++    /// Yes, we can derive automatically.
++    Yes,
+ 
+     /// The only thing that stops us from automatically deriving is that
+     /// array with more than maximum number of elements is used.
+@@ -103,8 +103,8 @@ pub enum CanDerive {
+     /// This means we probably can "manually" implement such trait.
+     Manually,
+ 
+-    /// Yes, we can derive automatically.
+-    Yes,
++    /// No, we cannot.
++    No,
+ }
+ 
+ impl Default for CanDerive {
+@@ -113,22 +113,6 @@ impl Default for CanDerive {
+     }
+ }
+ 
+-impl cmp::PartialOrd for CanDerive {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::CanDerive::*;
+-
+-        let ordering = match (*self, *rhs) {
+-            (x, y) if x == y => cmp::Ordering::Equal,
+-            (No, _) => cmp::Ordering::Greater,
+-            (_, No) => cmp::Ordering::Less,
+-            (Manually, _) => cmp::Ordering::Greater,
+-            (_, Manually) => cmp::Ordering::Less,
+-            _ => unreachable!()
+-        };
+-        Some(ordering)
+-    }
+-}
+-
+ impl CanDerive {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {

From c03349db8d53f259251bf7bfdc199bfb6b9eaf32 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 9 Nov 2019 01:51:09 +0100
Subject: [PATCH 8/8] icecat: add patch for rust 1.39

[ci skip]
---
 .../patches/firefox-60.7.0-rust-1.39+.patch   | 171 ++++++++++++++++++
 1 file changed, 171 insertions(+)
 create mode 100644 srcpkgs/icecat/patches/firefox-60.7.0-rust-1.39+.patch

diff --git a/srcpkgs/icecat/patches/firefox-60.7.0-rust-1.39+.patch b/srcpkgs/icecat/patches/firefox-60.7.0-rust-1.39+.patch
new file mode 100644
index 00000000000..55fbeee953b
--- /dev/null
+++ b/srcpkgs/icecat/patches/firefox-60.7.0-rust-1.39+.patch
@@ -0,0 +1,171 @@
+Source: q66, adapted from Gentoo patch for 68
+
+Based on https://github.com/rust-lang/rust/issues/64710
+
+--- third_party/rust/bindgen/.cargo-checksum.json
++++ third_party/rust/bindgen/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"3080fa2631c58e35cb1b32642139d8c303a609f8b554bfe69cd659a5374f18b9","LICENSE":"1d2e4bdb9d94ab020e9550136cae9ec73fc699c3c96a9d98078c542e9b93d294","README.md":"630d1a1d123c131bad0fec23173e263ba8ecc064b5cd8446d4cab7ffd197db45","build.rs":"032a1c51963894a421b0535f9227796d88768ac5f665a81d2edced69dc6d106a","src/callbacks.rs":"9d41b7848cea37e8741fa7bc947ba58a83647824b1a0bbe7ff75012c412eab13","src/clang.rs":"5ce27d0772e66f9f2f94a55afd18c98d4a57aed4c1d57da53b025fbbbb81a287","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"8badd4b5ba38b83477c3ee3fc6f9ca79059b5650f5b489b2723c335037e27d92","src/codegen/impl_debug.rs":"e2ffd5b6ed936698aa4b9e7e3459d353383792707ad51f829a18a822f69cab0e","src/codegen/impl_partialeq.rs":"d69e2a9cdf2fdea74a60532109c0a1a75791f5a5ef931b28c5d447fa2915e5d3","src/codegen/mod.rs":"c923594d8d27dede9192dd1081acdedf97d67430f780e3dc4db39b8928a55d71","src/codegen/struct_layout.rs":"9bd0e3455e55e2a1faa4f332a327c2529a21bdfdd0fcb3a45bc5cdd7801d288f","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"a437e6f736c8fba81ff74d90e7ddd142192ae5ffb9240d8c885eb84be6f2fe45","src/ir/analysis/derive_copy.rs":"59c21e299af3a36c6c82d4d16454700238269abd5929ec2d67c8414aebf82c3b","src/ir/analysis/derive_debug.rs":"3530e27ab0e260ec013cee3ad78a81497970c656a8eed589b755cce8caf53040","src/ir/analysis/derive_default.rs":"20e9dac151fadc59a7926ed9276ee8ced47e59c3f0c43f69fdafb75706045aca","src/ir/analysis/derive_hash.rs":"85c73c5660dc311ab6c15a21b69c4c5d2aa380d740decaf59ad594a6728cbe1f","src/ir/analysis/derive_partialeq_or_partialord.rs":"fb9540c324fdfcc9b0ae816e7713af000b11f5e2768c512c22a3082f263bb6bc","src/ir/analysis/has_destructor.rs":"d9aaaceba580b48eb0df4e5537b34b417c51ccdfeb8f6b72484f3bf4992317fe","src/ir/analysis/has_float.rs":"2a0465503d2c8247eaf916bd6a03594f3dc0370533d9a7c58cc5afb86693816c","src/ir/analysis/has_type_param_in_array.rs":"fcb1c78b6000f1f5eb8d8147e2afdaba9eb0e3a81b61e72537048dfdbeea7bcd","src/ir/analysis/has_vtable.rs":"37765e954ef792e369a58ccfe1d827a00fe9bce680466da1d6523671b94b6c92","src/ir/analysis/mod.rs":"ea5ace45c77e855674bb565ba0fef556f60e3293b0ddcf11d3a5a6ec15ab0648","src/ir/analysis/sizedness.rs":"3d3c8bde40604d53bb64273a3cbd8c55936a7dfe1de9b2ba92fc2c45572624b4","src/ir/analysis/template_params.rs":"6554dd1240142ec0e7299e678b696725f5cba99243d1c3d1cbf58d4764082fd6","src/ir/annotations.rs":"ef106afcbe6084c18bd13a37ee3c1cdc9596bfb055db8c773d81f8f15fec3208","src/ir/comment.rs":"000481754e5433d7c0886b9ce8b93b64c7ab1ae52867d211c73c7c4b336649a2","src/ir/comp.rs":"7b22f3ff19ca45a6fbfe7ea015109d43f4ddf65b33b47b1c37829fcb87cdff9b","src/ir/context.rs":"80679859b4efa52d74b0c7501bb5951b58c9705a97b96c9fc05134d1abe401c6","src/ir/derive.rs":"9550d01731ca66be28124c91fd0211a618743a065bec7b00e27c934afff82a84","src/ir/dot.rs":"d01f1621ab67e368d854a82bd6bb0b8dd52f3c2c733de8eaf81aece9543818cb","src/ir/enum_ty.rs":"3611100df8ddf01b010d2eae1d26a67df022e47b6236b0ed9d1b9b42340ebafd","src/ir/function.rs":"b86e665c6659c32bce39194240e7da6221c5a2ec51b362ad9f6e34f1bc396a6f","src/ir/int.rs":"1f61a472288afe489d9320bc8b13920333ece57891ae8570b4c4f25ab50688e6","src/ir/item.rs":"6f0d13615c6883b5e64c75f6d18d79b978b47aa3599ae1f4c196903d2d2cda68","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"17daab0a80564006de1f6b6190e7d9e6c5eb96990242fe707f8dc676f7110c18","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"828a890acdc8b10c44e69e2ed4a4f5d8c0e734606d3a8cc71658dcf43a49acf4","src/ir/template.rs":"21ba4cbacafce39b4a8013bc97e8054a906a8bc2f45a51aeef3b007caadde221","src/ir/traversal.rs":"eaca9aa6deb3eea9b8d7adc696781c70038796ff43e536bda47e90f84fe87d61","src/ir/ty.rs":"daa95f757288e4bfe84f9724c5f5df127b6f3a4452330691a24a94369db7d993","src/ir/var.rs":"57c8aa9f834c6f06418f7d471b1771bbb915821ef0d194b383be60092edca5f7","src/lib.rs":"d4217ac878659794c5990b1612f1de12f94f975257ea14307fb7dc63ac3a76da","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"f1be872e418a96582b048c095ceeeba012b92ffed8a9658cd1fd9ae0e192372d","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"a55241f2117f15729d174790f386e255fcb224b692325bbe6716dbb1d6874881","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"1b25ab82877ea8fe6ce1ce1f8ac54361f0218bad900af9eb11803994bf67c221"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"3080fa2631c58e35cb1b32642139d8c303a609f8b554bfe69cd659a5374f18b9","LICENSE":"1d2e4bdb9d94ab020e9550136cae9ec73fc699c3c96a9d98078c542e9b93d294","README.md":"630d1a1d123c131bad0fec23173e263ba8ecc064b5cd8446d4cab7ffd197db45","build.rs":"032a1c51963894a421b0535f9227796d88768ac5f665a81d2edced69dc6d106a","src/callbacks.rs":"9d41b7848cea37e8741fa7bc947ba58a83647824b1a0bbe7ff75012c412eab13","src/clang.rs":"5ce27d0772e66f9f2f94a55afd18c98d4a57aed4c1d57da53b025fbbbb81a287","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"8badd4b5ba38b83477c3ee3fc6f9ca79059b5650f5b489b2723c335037e27d92","src/codegen/impl_debug.rs":"e2ffd5b6ed936698aa4b9e7e3459d353383792707ad51f829a18a822f69cab0e","src/codegen/impl_partialeq.rs":"d69e2a9cdf2fdea74a60532109c0a1a75791f5a5ef931b28c5d447fa2915e5d3","src/codegen/mod.rs":"c923594d8d27dede9192dd1081acdedf97d67430f780e3dc4db39b8928a55d71","src/codegen/struct_layout.rs":"9bd0e3455e55e2a1faa4f332a327c2529a21bdfdd0fcb3a45bc5cdd7801d288f","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"a437e6f736c8fba81ff74d90e7ddd142192ae5ffb9240d8c885eb84be6f2fe45","src/ir/analysis/derive_copy.rs":"59c21e299af3a36c6c82d4d16454700238269abd5929ec2d67c8414aebf82c3b","src/ir/analysis/derive_debug.rs":"3530e27ab0e260ec013cee3ad78a81497970c656a8eed589b755cce8caf53040","src/ir/analysis/derive_default.rs":"20e9dac151fadc59a7926ed9276ee8ced47e59c3f0c43f69fdafb75706045aca","src/ir/analysis/derive_hash.rs":"85c73c5660dc311ab6c15a21b69c4c5d2aa380d740decaf59ad594a6728cbe1f","src/ir/analysis/derive_partialeq_or_partialord.rs":"fb9540c324fdfcc9b0ae816e7713af000b11f5e2768c512c22a3082f263bb6bc","src/ir/analysis/has_destructor.rs":"d9aaaceba580b48eb0df4e5537b34b417c51ccdfeb8f6b72484f3bf4992317fe","src/ir/analysis/has_float.rs":"2a0465503d2c8247eaf916bd6a03594f3dc0370533d9a7c58cc5afb86693816c","src/ir/analysis/has_type_param_in_array.rs":"fcb1c78b6000f1f5eb8d8147e2afdaba9eb0e3a81b61e72537048dfdbeea7bcd","src/ir/analysis/mod.rs":"ea5ace45c77e855674bb565ba0fef556f60e3293b0ddcf11d3a5a6ec15ab0648","src/ir/analysis/template_params.rs":"6554dd1240142ec0e7299e678b696725f5cba99243d1c3d1cbf58d4764082fd6","src/ir/annotations.rs":"ef106afcbe6084c18bd13a37ee3c1cdc9596bfb055db8c773d81f8f15fec3208","src/ir/comment.rs":"000481754e5433d7c0886b9ce8b93b64c7ab1ae52867d211c73c7c4b336649a2","src/ir/comp.rs":"7b22f3ff19ca45a6fbfe7ea015109d43f4ddf65b33b47b1c37829fcb87cdff9b","src/ir/context.rs":"80679859b4efa52d74b0c7501bb5951b58c9705a97b96c9fc05134d1abe401c6","src/ir/dot.rs":"d01f1621ab67e368d854a82bd6bb0b8dd52f3c2c733de8eaf81aece9543818cb","src/ir/enum_ty.rs":"3611100df8ddf01b010d2eae1d26a67df022e47b6236b0ed9d1b9b42340ebafd","src/ir/function.rs":"b86e665c6659c32bce39194240e7da6221c5a2ec51b362ad9f6e34f1bc396a6f","src/ir/int.rs":"1f61a472288afe489d9320bc8b13920333ece57891ae8570b4c4f25ab50688e6","src/ir/item.rs":"6f0d13615c6883b5e64c75f6d18d79b978b47aa3599ae1f4c196903d2d2cda68","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"17daab0a80564006de1f6b6190e7d9e6c5eb96990242fe707f8dc676f7110c18","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"828a890acdc8b10c44e69e2ed4a4f5d8c0e734606d3a8cc71658dcf43a49acf4","src/ir/template.rs":"21ba4cbacafce39b4a8013bc97e8054a906a8bc2f45a51aeef3b007caadde221","src/ir/traversal.rs":"eaca9aa6deb3eea9b8d7adc696781c70038796ff43e536bda47e90f84fe87d61","src/ir/ty.rs":"daa95f757288e4bfe84f9724c5f5df127b6f3a4452330691a24a94369db7d993","src/ir/var.rs":"57c8aa9f834c6f06418f7d471b1771bbb915821ef0d194b383be60092edca5f7","src/lib.rs":"d4217ac878659794c5990b1612f1de12f94f975257ea14307fb7dc63ac3a76da","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"f1be872e418a96582b048c095ceeeba012b92ffed8a9658cd1fd9ae0e192372d","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"a55241f2117f15729d174790f386e255fcb224b692325bbe6716dbb1d6874881","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"1b25ab82877ea8fe6ce1ce1f8ac54361f0218bad900af9eb11803994bf67c221"}
+--- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
++++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs
+@@ -10,17 +10,17 @@ use std::collections::hash_map::Entry;
+ use std::ops;
+ 
+ /// The result of the `HasVtableAnalysis` for an individual item.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum HasVtableResult {
+-    /// The item has a vtable, but the actual vtable pointer is in a base
+-    /// member.
+-    BaseHasVtable,
++    /// The item does not have a vtable pointer.
++    No,
+ 
+     /// The item has a vtable and the actual vtable pointer is within this item.
+     SelfHasVtable,
+ 
+-    /// The item does not have a vtable pointer.
+-    No
++    /// The item has a vtable, but the actual vtable pointer is in a base
++    /// member.
++    BaseHasVtable,
+ }
+ 
+ impl Default for HasVtableResult {
+@@ -29,21 +29,6 @@ impl Default for HasVtableResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for HasVtableResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::HasVtableResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (BaseHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, BaseHasVtable) => Some(cmp::Ordering::Less),
+-            (SelfHasVtable, _) => Some(cmp::Ordering::Greater),
+-            (_, SelfHasVtable) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl HasVtableResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/analysis/sizedness.rs
++++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs
+@@ -24,13 +24,14 @@ use std::ops;
+ ///
+ /// We initially assume that all types are `ZeroSized` and then update our
+ /// understanding as we learn more about each type.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)]
++#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum SizednessResult {
+-    /// Has some size that is known to be greater than zero. That doesn't mean
+-    /// it has a static size, but it is not zero sized for sure. In other words,
+-    /// it might contain an incomplete array or some other dynamically sized
+-    /// type.
+-    NonZeroSized,
++    /// The type is zero-sized.
++    ///
++    /// This means that if it is a C++ type, and is not being used as a base
++    /// member, then we must add an `_address` byte to enforce the
++    /// unique-address-per-distinct-object-instance rule.
++    ZeroSized,
+ 
+     /// Whether this type is zero-sized or not depends on whether a type
+     /// parameter is zero-sized or not.
+@@ -54,12 +55,11 @@ pub enum SizednessResult {
+     /// https://github.com/rust-lang-nursery/rust-bindgen/issues/586
+     DependsOnTypeParam,
+ 
+-    /// The type is zero-sized.
+-    ///
+-    /// This means that if it is a C++ type, and is not being used as a base
+-    /// member, then we must add an `_address` byte to enforce the
+-    /// unique-address-per-distinct-object-instance rule.
+-    ZeroSized,
++    /// Has some size that is known to be greater than zero. That doesn't mean
++    /// it has a static size, but it is not zero sized for sure. In other words,
++    /// it might contain an incomplete array or some other dynamically sized
++    /// type.
++    NonZeroSized,
+ }
+ 
+ impl Default for SizednessResult {
+@@ -68,21 +68,6 @@ impl Default for SizednessResult {
+     }
+ }
+ 
+-impl cmp::PartialOrd for SizednessResult {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::SizednessResult::*;
+-
+-        match (*self, *rhs) {
+-            (x, y) if x == y => Some(cmp::Ordering::Equal),
+-            (NonZeroSized, _) => Some(cmp::Ordering::Greater),
+-            (_, NonZeroSized) => Some(cmp::Ordering::Less),
+-            (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater),
+-            (_, DependsOnTypeParam) => Some(cmp::Ordering::Less),
+-            _ => unreachable!(),
+-        }
+-    }
+-}
+-
+ impl SizednessResult {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {
+--- third_party/rust/bindgen/src/ir/derive.rs
++++ third_party/rust/bindgen/src/ir/derive.rs
+@@ -137,10 +137,10 @@ pub trait CanTriviallyDerivePartialEqOrPartialOrd {
+ /// 
+ /// Initially we assume that we can derive trait for all types and then
+ /// update our understanding as we learn more about each type.
+-#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)]
++#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+ pub enum CanDerive {
+-    /// No, we cannot.
+-    No,
++    /// Yes, we can derive automatically.
++    Yes,
+ 
+     /// The only thing that stops us from automatically deriving is that
+     /// array with more than maximum number of elements is used.
+@@ -148,8 +148,8 @@ pub enum CanDerive {
+     /// This means we probably can "manually" implement such trait.
+     ArrayTooLarge,
+ 
+-    /// Yes, we can derive automatically.
+-    Yes,
++    /// No, we cannot.
++    No,
+ }
+ 
+ impl Default for CanDerive {
+@@ -158,22 +158,6 @@ impl Default for CanDerive {
+     }
+ }
+ 
+-impl cmp::PartialOrd for CanDerive {
+-    fn partial_cmp(&self, rhs: &Self) -> Option<cmp::Ordering> {
+-        use self::CanDerive::*;
+-
+-        let ordering = match (*self, *rhs) {
+-            (x, y) if x == y => cmp::Ordering::Equal,
+-            (No, _) => cmp::Ordering::Greater,
+-            (_, No) => cmp::Ordering::Less,
+-            (ArrayTooLarge, _) => cmp::Ordering::Greater,
+-            (_, ArrayTooLarge) => cmp::Ordering::Less,
+-            _ => unreachable!()
+-        };
+-        Some(ordering)
+-    }
+-}
+-
+ impl CanDerive {
+     /// Take the least upper bound of `self` and `rhs`.
+     pub fn join(self, rhs: Self) -> Self {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: rust: update to 1.39.0, cargo: update to 0.40.0
  2019-11-08 20:03 [PR PATCH] rust: update to 1.39.0, cargo: update to 0.40.0 voidlinux-github
  2019-11-08 23:53 ` [PR PATCH] [Updated] " voidlinux-github
  2019-11-09  1:33 ` voidlinux-github
@ 2019-11-09 20:39 ` voidlinux-github
  2019-11-09 20:40 ` voidlinux-github
  2019-11-10 13:58 ` [PR PATCH] [Merged]: " voidlinux-github
  4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-11-09 20:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

New comment by xtraeme on void-packages repository

https://github.com/void-linux/void-packages/pull/16243#issuecomment-552135301

Comment:
ready?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: rust: update to 1.39.0, cargo: update to 0.40.0
  2019-11-08 20:03 [PR PATCH] rust: update to 1.39.0, cargo: update to 0.40.0 voidlinux-github
                   ` (2 preceding siblings ...)
  2019-11-09 20:39 ` voidlinux-github
@ 2019-11-09 20:40 ` voidlinux-github
  2019-11-10 13:58 ` [PR PATCH] [Merged]: " voidlinux-github
  4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-11-09 20:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/16243#issuecomment-552135409

Comment:
as far as i know, yes

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Merged]: rust: update to 1.39.0, cargo: update to 0.40.0
  2019-11-08 20:03 [PR PATCH] rust: update to 1.39.0, cargo: update to 0.40.0 voidlinux-github
                   ` (3 preceding siblings ...)
  2019-11-09 20:40 ` voidlinux-github
@ 2019-11-10 13:58 ` " voidlinux-github
  4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-11-10 13:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

There's a merged pull request on the void-packages repository

rust: update to 1.39.0, cargo: update to 0.40.0
https://github.com/void-linux/void-packages/pull/16243

Description:
This also switches to LLVM9.

~~Generally seems to work fine except Firefox fails to build now. Fix is probably to be done in Firefox. Some generated code from `style` fails to compile, with errors like~~

```
19:20.28 error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `gecko_bindings::structs::root::mozilla::GeckoBackground`:
```

~~As the generated file is one line, it spams the console really badly,~~ but turns out that is not a new issue, so we can ~~probably~~ ignore that, ~~as long as FF can get fixed~~.

Unbreak status:

- [x] `firefox`
- [x] `firefox-esr`
- [x] `thunderbird`
- [x] `icecat`


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 20:03 [PR PATCH] rust: update to 1.39.0, cargo: update to 0.40.0 voidlinux-github
2019-11-08 23:53 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-09  1:33 ` voidlinux-github
2019-11-09 20:39 ` voidlinux-github
2019-11-09 20:40 ` voidlinux-github
2019-11-10 13:58 ` [PR PATCH] [Merged]: " voidlinux-github

Github messages for voidlinux

Archives are clonable: git clone --mirror http://inbox.vuxu.org/voidlinux-github

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git