summaryrefslogtreecommitdiff
path: root/bootstrap/rust-1.63/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-08-09 15:21:38 -0500
commite50c8b2647ce482654ab0e4f77a88893b497ed37 (patch)
treeeb0c442d10d190933dac120b525e6779e44ea2bd /bootstrap/rust-1.63/0002-Fix-linking-to-zlib-when-cross-compiling.patch
parentecce2855f3220b8b9b39c58ef05c97643fd62f1b (diff)
downloadpackages-e50c8b2647ce482654ab0e4f77a88893b497ed37.tar.gz
packages-e50c8b2647ce482654ab0e4f77a88893b497ed37.tar.bz2
packages-e50c8b2647ce482654ab0e4f77a88893b497ed37.tar.xz
packages-e50c8b2647ce482654ab0e4f77a88893b497ed37.zip
bootstrap/rust-1.{61-79}: New package
Diffstat (limited to 'bootstrap/rust-1.63/0002-Fix-linking-to-zlib-when-cross-compiling.patch')
-rw-r--r--bootstrap/rust-1.63/0002-Fix-linking-to-zlib-when-cross-compiling.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/bootstrap/rust-1.63/0002-Fix-linking-to-zlib-when-cross-compiling.patch b/bootstrap/rust-1.63/0002-Fix-linking-to-zlib-when-cross-compiling.patch
new file mode 100644
index 000000000..ab00117a0
--- /dev/null
+++ b/bootstrap/rust-1.63/0002-Fix-linking-to-zlib-when-cross-compiling.patch
@@ -0,0 +1,36 @@
+From 702ebc6e2283f69e8b024b2cf12899a2bbdf6e8b 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 3b6808d693f..4713f550a73 100644
+--- a/compiler/rustc_llvm/build.rs
++++ b/compiler/rustc_llvm/build.rs
+@@ -238,16 +238,15 @@ 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") {
+ println!("cargo:rustc-link-lib=z");
+ }
+- cmd.args(&components);
+
+ for lib in output(&mut cmd).split_whitespace() {
+ let name = if let Some(stripped) = lib.strip_prefix("-l") {
+--
+2.35.1
+