mirror of
https://git.proxmox.com/git/rustc
synced 2026-01-14 19:33:32 +00:00
Update patches for 1.14 and 1.15
This commit is contained in:
parent
62da4b0d02
commit
89fb5abfa4
4
debian/build-preview-dsc.sh
vendored
4
debian/build-preview-dsc.sh
vendored
@ -29,8 +29,8 @@ for f in *; do
|
||||
if test -f "${fb}_${verprefix}"*; then mv "${fb}_${verprefix}"* "$f"; fi
|
||||
done )
|
||||
case "$1" in
|
||||
"1.13."*|"1.14."*)
|
||||
dquilt delete nodoc-for-build-arch.patch
|
||||
"1.14."*|"1.15."*)
|
||||
dquilt delete ignore-stdcall-test-on-arm64.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
19
debian/patches/dynamic-link-llvm_1.14.patch
vendored
19
debian/patches/dynamic-link-llvm_1.14.patch
vendored
@ -11,15 +11,28 @@ Forwarded: not-needed
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/librustc_llvm/build.rs
|
||||
+++ b/src/librustc_llvm/build.rs
|
||||
@@ -123,50 +123,10 @@
|
||||
.cpp_link_stdlib(None) // we handle this below
|
||||
.compile("librustllvm.a");
|
||||
@@ -157,63 +157,10 @@
|
||||
|
||||
let (llvm_kind, llvm_link_arg) = detect_llvm_link(&llvm_config);
|
||||
|
||||
- // Link in all LLVM libraries, if we're uwring the "wrong" llvm-config then
|
||||
- // we don't pick up system libs because unfortunately they're for the host
|
||||
- // of llvm-config, not the target that we're attempting to link.
|
||||
- let mut cmd = Command::new(&llvm_config);
|
||||
- cmd.arg("--libs");
|
||||
-
|
||||
- // Force static linking with "--link-static" if available.
|
||||
- let mut version_cmd = Command::new(&llvm_config);
|
||||
- version_cmd.arg("--version");
|
||||
- let version_output = output(&mut version_cmd);
|
||||
- let mut parts = version_output.split('.');
|
||||
- if let (Some(major), Some(minor)) = (parts.next().and_then(|s| s.parse::<u32>().ok()),
|
||||
- parts.next().and_then(|s| s.parse::<u32>().ok())) {
|
||||
- if major > 3 || (major == 3 && minor >= 8) {
|
||||
- cmd.arg("--link-static");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if !is_crossed {
|
||||
- cmd.arg("--system-libs");
|
||||
- }
|
||||
|
||||
@ -11,15 +11,20 @@ Forwarded: not-needed
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/librustc_llvm/build.rs
|
||||
+++ b/src/librustc_llvm/build.rs
|
||||
@@ -123,50 +123,10 @@
|
||||
.cpp_link_stdlib(None) // we handle this below
|
||||
.compile("librustllvm.a");
|
||||
@@ -157,55 +157,10 @@
|
||||
|
||||
let (llvm_kind, llvm_link_arg) = detect_llvm_link(&llvm_config);
|
||||
|
||||
- // Link in all LLVM libraries, if we're uwring the "wrong" llvm-config then
|
||||
- // we don't pick up system libs because unfortunately they're for the host
|
||||
- // of llvm-config, not the target that we're attempting to link.
|
||||
- let mut cmd = Command::new(&llvm_config);
|
||||
- cmd.arg("--libs");
|
||||
-
|
||||
- if let Some(link_arg) = llvm_link_arg {
|
||||
- cmd.arg(link_arg);
|
||||
- }
|
||||
-
|
||||
- if !is_crossed {
|
||||
- cmd.arg("--system-libs");
|
||||
- }
|
||||
@ -40,7 +45,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
- // that off
|
||||
- lib.trim_right_matches(".lib")
|
||||
- } else {
|
||||
- continue
|
||||
- continue;
|
||||
- };
|
||||
-
|
||||
- // Don't need or want this library, but LLVM's CMake build system
|
||||
@ -49,11 +54,11 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
- // library and it otherwise may just pull in extra dependencies on
|
||||
- // libedit which we don't want
|
||||
- if name == "LLVMLineEditor" {
|
||||
- continue
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- let kind = if name.starts_with("LLVM") {
|
||||
- "static"
|
||||
- llvm_kind
|
||||
- } else {
|
||||
- "dylib"
|
||||
- };
|
||||
@ -68,7 +73,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
//
|
||||
--- a/src/etc/mklldeps.py
|
||||
+++ b/src/etc/mklldeps.py
|
||||
@@ -56,38 +56,12 @@
|
||||
@@ -56,38 +56,13 @@
|
||||
|
||||
f.write("\n")
|
||||
|
||||
@ -108,6 +113,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
+# Link in Debian full LLVM shared library.
|
||||
+# TODO: not sure what to do in the cross-compiling case.
|
||||
+f.write("#[link(name = \"LLVM-3.9\")]\n")
|
||||
+
|
||||
|
||||
# LLVM ldflags
|
||||
out = run([llvm_config, '--ldflags'])
|
||||
38
debian/patches/fix-configure-for-deb-arches_1.14.patch
vendored
Normal file
38
debian/patches/fix-configure-for-deb-arches_1.14.patch
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
Description: Fix configure architecture targets for Debian
|
||||
Rust upstream sometimes builds for multiple triplets depending on the CPU,
|
||||
since it could be valid for multiple triplets. We don't need to do this for
|
||||
Debian; each DEB_HOST_ARCH maps to a single triplet. This patch indirectly
|
||||
achieves this by setting CFG_{OS,CPU}TYPE to more specific values depending
|
||||
on what DEB_HOST_ARCH is, hopefully preventing a multiple build.
|
||||
.
|
||||
Tested on armhf, untested on armel due to missing build-deps.
|
||||
Author: Ximin Luo <infinity0@debian.org>
|
||||
Forwarded: not-needed
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
Index: rustc.git/configure
|
||||
===================================================================
|
||||
--- rustc.git.orig/configure
|
||||
+++ rustc.git/configure
|
||||
@@ -508,8 +508,19 @@ case $CFG_CPUTYPE in
|
||||
;;
|
||||
|
||||
armv7l)
|
||||
- CFG_CPUTYPE=armv7
|
||||
- CFG_OSTYPE="${CFG_OSTYPE}eabihf"
|
||||
+ case $DEB_HOST_ARCH in
|
||||
+ armhf)
|
||||
+ CFG_CPUTYPE=armv7
|
||||
+ CFG_OSTYPE="${CFG_OSTYPE}eabihf"
|
||||
+ ;;
|
||||
+ armel)
|
||||
+ CFG_CPUTYPE=arm
|
||||
+ CFG_OSTYPE="${CFG_OSTYPE}eabi"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ err "unknown DEB_HOST_ARCH $DEB_HOST_ARCH for armv7l cpu"
|
||||
+ ;;
|
||||
+ esac
|
||||
;;
|
||||
|
||||
aarch64)
|
||||
38
debian/patches/fix-configure-for-deb-arches_1.15.patch
vendored
Normal file
38
debian/patches/fix-configure-for-deb-arches_1.15.patch
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
Description: Fix configure architecture targets for Debian
|
||||
Rust upstream sometimes builds for multiple triplets depending on the CPU,
|
||||
since it could be valid for multiple triplets. We don't need to do this for
|
||||
Debian; each DEB_HOST_ARCH maps to a single triplet. This patch indirectly
|
||||
achieves this by setting CFG_{OS,CPU}TYPE to more specific values depending
|
||||
on what DEB_HOST_ARCH is, hopefully preventing a multiple build.
|
||||
.
|
||||
Tested on armhf, untested on armel due to missing build-deps.
|
||||
Author: Ximin Luo <infinity0@debian.org>
|
||||
Forwarded: not-needed
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
Index: rustc.git/configure
|
||||
===================================================================
|
||||
--- rustc.git.orig/configure
|
||||
+++ rustc.git/configure
|
||||
@@ -508,8 +508,19 @@ case $CFG_CPUTYPE in
|
||||
;;
|
||||
|
||||
armv7l)
|
||||
- CFG_CPUTYPE=armv7
|
||||
- CFG_OSTYPE="${CFG_OSTYPE}eabihf"
|
||||
+ case $DEB_HOST_ARCH in
|
||||
+ armhf)
|
||||
+ CFG_CPUTYPE=armv7
|
||||
+ CFG_OSTYPE="${CFG_OSTYPE}eabihf"
|
||||
+ ;;
|
||||
+ armel)
|
||||
+ CFG_CPUTYPE=arm
|
||||
+ CFG_OSTYPE="${CFG_OSTYPE}eabi"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ err "unknown DEB_HOST_ARCH $DEB_HOST_ARCH for armv7l cpu"
|
||||
+ ;;
|
||||
+ esac
|
||||
;;
|
||||
|
||||
aarch64)
|
||||
Loading…
Reference in New Issue
Block a user