summaryrefslogtreecommitdiff
path: root/bootstrap/rust-1.66/0002-Fix-linking-to-zlib-when-cross-compiling.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-07-30 09:27:55 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-10-17 00:58:44 -0500
commit29e11a1231ed159572aa4e6c64fd9cdac97f7c03 (patch)
tree8abd711b96829786858c97afb381f16992d31c58 /bootstrap/rust-1.66/0002-Fix-linking-to-zlib-when-cross-compiling.patch
parent595bc02f3080bbf44fa78068e5b56e13821ab6a6 (diff)
downloadpackages-29e11a1231ed159572aa4e6c64fd9cdac97f7c03.tar.gz
packages-29e11a1231ed159572aa4e6c64fd9cdac97f7c03.tar.bz2
packages-29e11a1231ed159572aa4e6c64fd9cdac97f7c03.tar.xz
packages-29e11a1231ed159572aa4e6c64fd9cdac97f7c03.zip
bootstrap/rust-1.{61-79}: New package
Diffstat (limited to 'bootstrap/rust-1.66/0002-Fix-linking-to-zlib-when-cross-compiling.patch')
-rw-r--r--bootstrap/rust-1.66/0002-Fix-linking-to-zlib-when-cross-compiling.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/bootstrap/rust-1.66/0002-Fix-linking-to-zlib-when-cross-compiling.patch b/bootstrap/rust-1.66/0002-Fix-linking-to-zlib-when-cross-compiling.patch
new file mode 100644
index 000000000..e99155e78
--- /dev/null
+++ b/bootstrap/rust-1.66/0002-Fix-linking-to-zlib-when-cross-compiling.patch
@@ -0,0 +1,35 @@
+From d5caf4a4c7cfee3a53892b6ad90603ae86321baa Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 10 Jan 2018 13:36:41 -0600
+Subject: [PATCH 02/14] Fix linking to zlib when cross-compiling
+
+---
+ compiler/rustc_llvm/build.rs | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
+index 28e092c1eb72c..00e5cff65d851 100644
+--- a/compiler/rustc_llvm/build.rs
++++ b/compiler/rustc_llvm/build.rs
+@@ -234,10 +234,10 @@ fn main() {
+ // of llvm-config, not the target that we're attempting to link.
+ let mut cmd = Command::new(&llvm_config);
+ cmd.arg(llvm_link_arg).arg("--libs");
++ cmd.arg("--system-libs");
++ cmd.args(&components);
+
+- if !is_crossed {
+- cmd.arg("--system-libs");
+- } else if target.contains("windows-gnu") {
++ if target.contains("windows-gnu") {
+ println!("cargo:rustc-link-lib=shell32");
+ println!("cargo:rustc-link-lib=uuid");
+ } else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
+@@ -250,7 +250,6 @@ fn main() {
+ // 32-bit targets need to link libatomic.
+ println!("cargo:rustc-link-lib=atomic");
+ }
+- cmd.args(&components);
+
+ for lib in output(&mut cmd).split_whitespace() {
+ let name = if let Some(stripped) = lib.strip_prefix("-l") {