]> git.proxmox.com Git - rustc.git/commitdiff
Take care of some outstanding bugs
authorXimin Luo <infinity0@debian.org>
Sat, 3 Mar 2018 11:13:18 +0000 (12:13 +0100)
committerXimin Luo <infinity0@debian.org>
Sat, 3 Mar 2018 11:23:04 +0000 (12:23 +0100)
debian/architecture.mk
debian/changelog
debian/control
debian/patches/d-armel-disable-kernel-helpers.patch [new file with mode: 0644]
debian/patches/series
debian/patches/u-powerpcspe-support.patch [new file with mode: 0644]
debian/rules

index daeda01b973418445cd2309c2b95eda9538918db..9a71eb996a7f1563feb0b7234af672c03652548f 100644 (file)
@@ -2,7 +2,10 @@
 
 include /usr/share/dpkg/architecture.mk
 
-rust_cpu = $(subst i586,i686,$(if $(findstring -armhf-,-$(2)-),$(subst arm,armv7,$(1)),$(1)))
+rust_cpu = $(subst i586,i686,\
+$(if $(findstring -armhf-,-$(2)-),$(subst arm,armv7,$(1)),\
+$(if $(findstring -armel-,-$(2)-),$(subst arm,armv5te,$(1)),\
+$(1))))
 rust_type_setvar = $(1)_RUST_TYPE ?= $(call rust_cpu,$($(1)_GNU_CPU),$($(1)_ARCH))-unknown-$($(1)_GNU_SYSTEM)
 
 $(foreach machine,BUILD HOST TARGET,\
index 6de4e28c8d52c84ca32fb1183070e9292978f3c3..b423fe3c876ce911b090d1972105db435c49b70d 100644 (file)
@@ -2,6 +2,14 @@ rustc (1.24.1+dfsg1-1) UNRELEASED; urgency=medium
 
   * More sparc64 CABI fixes. (Closes: #888757)
   * New upstream release.
+  * Include Debian-specific patch to disable kernel helpers on armel.
+    (Closes: #891902)
+  * Include missing build-dependencies for pkg.rustc.dlstage0 build profile.
+    (Closes: #891022)
+  * Add architecture.mk mapping for armel => armv5te-unknown-linux-gnueabi.
+    (Closes: #891913)
+  * Enable debuginfo-only-std on armel as well. (Closes: #891961)
+  * Backport upstream patch to support powerpcspe. (Closes: #891542)
 
  -- Ximin Luo <infinity0@debian.org>  Sat, 03 Mar 2018 11:37:35 +0100
 
index 09501ab6646111c95b5f73b46068906c84bcf30c..06cc1516cc05e4d11ff773f272868340139c2233 100644 (file)
@@ -34,6 +34,9 @@ Build-Depends: debhelper (>= 9),
 # Work around #864741. The version constraint for gdb above should already do
 # that, but this will keep things covered even in the case that they change
 # gdb-minimal to do a versioned Provides: gdb.
+# Extra build-deps needed for x.py to download stuff in pkg.rustc.dlstage0.
+               curl <pkg.rustc.dlstage0>,
+               ca-certificates <pkg.rustc.dlstage0>,
 Build-Conflicts: gdb-minimal <!nocheck>
 Standards-Version: 4.1.3
 Homepage: http://www.rust-lang.org/
diff --git a/debian/patches/d-armel-disable-kernel-helpers.patch b/debian/patches/d-armel-disable-kernel-helpers.patch
new file mode 100644 (file)
index 0000000..fd04e60
--- /dev/null
@@ -0,0 +1,15 @@
+--- rustc-1.24.0+dfsg1/src/libcompiler_builtins/build.rs.orig  2018-02-12 16:56:07.000000000 -0200
++++ rustc-1.24.0+dfsg1/src/libcompiler_builtins/build.rs       2018-03-02 07:22:10.124164162 -0300
+@@ -52,9 +52,9 @@
+     }
+     // Only emit the ARM Linux atomic emulation on pre-ARMv6 architectures.
+-    if llvm_target[0] == "armv4t" || llvm_target[0] == "armv5te" {
+-        println!("cargo:rustc-cfg=kernel_user_helpers")
+-    }
++    // if llvm_target[0] == "armv4t" || llvm_target[0] == "armv5te" {
++    //     println!("cargo:rustc-cfg=kernel_user_helpers")
++    // }
+ }
+ #[cfg(feature = "gen-tests")]
index 1c2a7c02693cdf27b1f8a91948282003bbbbb795..d44e4d1cf32d3edf47215ed6239f267671c3289b 100644 (file)
@@ -3,6 +3,7 @@
 # pending, forwarded
 u-sparc64-detection.patch
 u-fix-sparc64-cabi.patch
+u-powerpcspe-support.patch
 u-gperf-3.1.patch
 u-reproducible-build.patch
 u-ignoretest-armhf_01.patch
@@ -30,5 +31,7 @@ d-dont-download-stage0.patch
 d-no-web-dependencies-in-doc.patch
 d-ignore-removed-submodules.patch
 
+d-armel-disable-kernel-helpers.patch
+
 # Work around for some porterboxes, keep this commented
 #d-host-duplicates.patch
diff --git a/debian/patches/u-powerpcspe-support.patch b/debian/patches/u-powerpcspe-support.patch
new file mode 100644 (file)
index 0000000..0c2c8d5
--- /dev/null
@@ -0,0 +1,95 @@
+diff -Nru rustc-1.24.0+dfsg1.orig/src/bootstrap/native.rs rustc-1.24.0+dfsg1/src/bootstrap/native.rs
+--- rustc-1.24.0+dfsg1.orig/src/bootstrap/native.rs    2018-02-12 19:51:18.000000000 +0100
++++ rustc-1.24.0+dfsg1/src/bootstrap/native.rs 2018-02-26 16:10:36.018558904 +0100
+@@ -440,6 +440,7 @@
+             "mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
+             "mipsel-unknown-linux-gnu" => "linux-mips32",
+             "powerpc-unknown-linux-gnu" => "linux-ppc",
++            "powerpc-unknown-linux-gnuspe" => "linux-ppc",
+             "powerpc64-unknown-linux-gnu" => "linux-ppc64",
+             "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
+             "s390x-unknown-linux-gnu" => "linux64-s390x",
+diff -Nru rustc-1.24.0+dfsg1.orig/src/librustc_back/target/mod.rs rustc-1.24.0+dfsg1/src/librustc_back/target/mod.rs
+--- rustc-1.24.0+dfsg1.orig/src/librustc_back/target/mod.rs    2018-02-12 19:51:18.000000000 +0100
++++ rustc-1.24.0+dfsg1/src/librustc_back/target/mod.rs 2018-02-26 16:10:39.178562446 +0100
+@@ -144,6 +144,7 @@
+     ("mips64el-unknown-linux-gnuabi64", mips64el_unknown_linux_gnuabi64),
+     ("mipsel-unknown-linux-gnu", mipsel_unknown_linux_gnu),
+     ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
++    ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
+     ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
+     ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
+     ("s390x-unknown-linux-gnu", s390x_unknown_linux_gnu),
+diff -Nru rustc-1.24.0+dfsg1.orig/src/librustc_back/target/powerpc_unknown_linux_gnuspe.rs rustc-1.24.0+dfsg1/src/librustc_back/target/powerpc_unknown_linux_gnuspe.rs
+--- rustc-1.24.0+dfsg1.orig/src/librustc_back/target/powerpc_unknown_linux_gnuspe.rs   1970-01-01 01:00:00.000000000 +0100
++++ rustc-1.24.0+dfsg1/src/librustc_back/target/powerpc_unknown_linux_gnuspe.rs        2018-02-26 16:10:39.178562446 +0100
+@@ -0,0 +1,35 @@
++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use LinkerFlavor;
++use target::{Target, TargetResult};
++
++pub fn target() -> TargetResult {
++    let mut base = super::linux_base::opts();
++    base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mspe".to_string());
++    base.max_atomic_width = Some(32);
++
++    // see #36994
++    base.exe_allocation_crate = None;
++
++    Ok(Target {
++        llvm_target: "powerpc-unknown-linux-gnuspe".to_string(),
++        target_endian: "big".to_string(),
++        target_pointer_width: "32".to_string(),
++        target_c_int_width: "32".to_string(),
++        data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
++        arch: "powerpc".to_string(),
++        target_os: "linux".to_string(),
++        target_env: "gnu".to_string(),
++        target_vendor: "unknown".to_string(),
++        linker_flavor: LinkerFlavor::Gcc,
++        options: base,
++    })
++}
+diff -Nru rustc-1.24.0+dfsg1.orig/src/test/run-make/atomic-lock-free/Makefile rustc-1.24.0+dfsg1/src/test/run-make/atomic-lock-free/Makefile
+--- rustc-1.24.0+dfsg1.orig/src/test/run-make/atomic-lock-free/Makefile        2018-02-15 22:24:54.000000000 +0100
++++ rustc-1.24.0+dfsg1/src/test/run-make/atomic-lock-free/Makefile     2018-02-26 16:10:45.258569263 +0100
+@@ -32,6 +32,8 @@
+ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
+       $(RUSTC) --target=powerpc-unknown-linux-gnu atomic_lock_free.rs
+       nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
++      $(RUSTC) --target=powerpc-unknown-linux-gnuspe atomic_lock_free.rs
++      nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
+       $(RUSTC) --target=powerpc64-unknown-linux-gnu atomic_lock_free.rs
+       nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
+       $(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
+diff -Nru rustc-1.24.0+dfsg1.orig/src/tools/build-manifest/src/main.rs rustc-1.24.0+dfsg1/src/tools/build-manifest/src/main.rs
+--- rustc-1.24.0+dfsg1.orig/src/tools/build-manifest/src/main.rs       2018-02-12 19:51:19.000000000 +0100
++++ rustc-1.24.0+dfsg1/src/tools/build-manifest/src/main.rs    2018-02-26 16:10:42.178565811 +0100
+@@ -82,6 +82,7 @@
+     "mipsel-unknown-linux-gnu",
+     "mipsel-unknown-linux-musl",
+     "powerpc-unknown-linux-gnu",
++    "powerpc-unknown-linux-gnuspe",
+     "powerpc64-unknown-linux-gnu",
+     "powerpc64le-unknown-linux-gnu",
+     "s390x-unknown-linux-gnu",
+diff -Nru rustc-1.24.0+dfsg1.orig/src/vendor/cc/src/lib.rs rustc-1.24.0+dfsg1/src/vendor/cc/src/lib.rs
+--- rustc-1.24.0+dfsg1.orig/src/vendor/cc/src/lib.rs   2018-02-12 21:28:22.000000000 +0100
++++ rustc-1.24.0+dfsg1/src/vendor/cc/src/lib.rs        2018-02-26 16:11:11.754599023 +0100
+@@ -1433,6 +1433,7 @@
+                         "mips64-unknown-linux-gnuabi64" => Some("mips64-linux-gnuabi64"),
+                         "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
+                         "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
++                        "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
+                         "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
+                         "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
+                         "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
index aeb08dceaa1f83c5c608065ad50457bd0893cbc5..302573bba3204af1263f633fdd549afda8c5dae1 100755 (executable)
@@ -163,7 +163,8 @@ debian/config.toml: debian/config.toml.in
                "$<" > "$@"
        ! $(DOWNLOAD_BOOTSTRAP) || sed -i -e '/^rustc = /d' -e '/^cargo = /d' "$@"
        # Work around armhf issue: https://github.com/rust-lang/rust/issues/45854
-       [ $(DEB_BUILD_ARCH) != armhf ] || sed -i -e '/^debuginfo-only-std = /d' "$@"
+       [ $(DEB_BUILD_ARCH) != armhf -a \
+         $(DEB_BUILD_ARCH) != armel ] || sed -i -e '/^debuginfo-only-std = /d' "$@"
 
 debian/rust-src.%: debian/rust-src.%.in
        m4  -DRUST_LONG_VERSION="$(RUST_LONG_VERSION)" \