pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rust*: fix mismerged patch (Linux)



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Mon Nov 25 15:39:37 2024 +0100
Changeset:	699e0fd81425e9634c35a145f1bd5f655f421de9

Modified Files:
	rust181/distinfo
	rust181/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
	rust182/distinfo
	rust182/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs

Log Message:
rust*: fix mismerged patch (Linux)

sync from pkgsrc

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=699e0fd81425e9634c35a145f1bd5f655f421de9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rust181/distinfo                                         |  2 +-
 ...patch-compiler_rustc__codegen__ssa_src_back_linker.rs | 16 ++++++++--------
 rust182/distinfo                                         |  2 +-
 ...patch-compiler_rustc__codegen__ssa_src_back_linker.rs | 16 ++++++++--------
 4 files changed, 18 insertions(+), 18 deletions(-)

diffs:
diff --git a/rust181/distinfo b/rust181/distinfo
index 04d4a34a31..5c421ce57f 100644
--- a/rust181/distinfo
+++ b/rust181/distinfo
@@ -108,7 +108,7 @@ Size (rust-std-1.80.1-x86_64-unknown-netbsd.tar.xz) = 25793560 bytes
 BLAKE2s (rustc-1.81.0-src.tar.gz) = 5b1c5e436800fbd061df9aee740c8bf73d17654d75016eb84a7e3661e9322957
 SHA512 (rustc-1.81.0-src.tar.gz) = ea1f894b56085ab95ff1bdf9ef20e0756c134be8217c8e8934de44651f7cac6339829a198f8770d97050da79711527ff80fae184038fdb2962b741d0f99b71a1
 Size (rustc-1.81.0-src.tar.gz) = 434198596 bytes
-SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = a11f894d87516da6a8e3faaa4425c8212ff5899f
+SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = f2af6e3b4925e8ca21b7cd783f7831b72700384a
 SHA1 (patch-compiler_rustc__llvm_build.rs) = a4a66d449fc9eb99d648d02a041778a68f4f7ce8
 SHA1 (patch-compiler_rustc__target_src_spec_base_netbsd.rs) = 7d910631f49acf2c33fdd191fd3e0f261efae234
 SHA1 (patch-compiler_rustc__target_src_spec_mod.rs) = a22b5d28997ed9a5565deec9c34322165d563d00
diff --git a/rust181/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs b/rust181/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
index d35a82f2b0..cb953e761f 100644
--- a/rust181/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
+++ b/rust181/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
@@ -1,9 +1,9 @@
-$NetBSD: patch-compiler_rustc__codegen__ssa_src_back_linker.rs,v 1.17 2024/07/27 02:35:24 tnn Exp $
+$NetBSD: patch-compiler_rustc__codegen__ssa_src_back_linker.rs,v 1.19 2024/11/25 14:37:35 tnn Exp $
 
 Do not use @rpath on Darwin.
 Find external libunwind on Linux.
 
---- compiler/rustc_codegen_ssa/src/back/linker.rs.orig	2006-07-24 01:21:28.000000000 +0000
+--- compiler/rustc_codegen_ssa/src/back/linker.rs.orig	2024-09-04 15:07:06.000000000 +0000
 +++ compiler/rustc_codegen_ssa/src/back/linker.rs
 @@ -402,7 +402,7 @@ impl<'a> GccLinker<'a> {
              // principled solution at some point to force the compiler to pass
@@ -14,14 +14,14 @@ Find external libunwind on Linux.
                  rpath.push(out_filename.file_name().unwrap());
                  self.link_arg("-install_name").link_arg(rpath);
              }
-@@ -880,6 +880,10 @@ impl<'a> Linker for MsvcLinker<'a> {
+@@ -528,6 +528,10 @@ impl<'a> Linker for GccLinker<'a> {
+     }
  
-     fn link_dylib_by_name(&mut self, name: &str, verbatim: bool, _as_needed: bool) {
-         self.link_arg(format!("{}{}", name, if verbatim { "" } else { ".lib" }));
+     fn link_dylib_by_name(&mut self, name: &str, verbatim: bool, as_needed: bool) {
 +        if self.sess.target.os.contains("linux") && name == "unwind" {
 +            self.link_arg("-rpath,@PREFIX@/lib");
 +            self.link_arg("-L@PREFIX@/lib");
 +        }
-     }
- 
-     fn link_dylib_by_path(&mut self, path: &Path, _as_needed: bool) {
+         if self.sess.target.os == "illumos" && name == "c" {
+             // libc will be added via late_link_args on illumos so that it will
+             // appear last in the library search order.
diff --git a/rust182/distinfo b/rust182/distinfo
index 6931616f7d..3521ea5d45 100644
--- a/rust182/distinfo
+++ b/rust182/distinfo
@@ -108,7 +108,7 @@ Size (rust-std-1.82.0-riscv64gc-unknown-netbsd.tar.xz) = 22154760 bytes
 BLAKE2s (rustc-1.82.0-src.tar.gz) = 5240e949251d8016c35102ab8254d0aba05ff459570ef4097443ff098b417f3d
 SHA512 (rustc-1.82.0-src.tar.gz) = 0a4b4aeffe02fae35bafd64429d15009c23e5f698c0c596c6250c4de6c0dfc4fa7af5b2662c33a6fc511b1f1f2f253e5a6f2967c10ab41347c6a7f1d31bbb303
 Size (rustc-1.82.0-src.tar.gz) = 434309696 bytes
-SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = a11f894d87516da6a8e3faaa4425c8212ff5899f
+SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = f2af6e3b4925e8ca21b7cd783f7831b72700384a
 SHA1 (patch-compiler_rustc__llvm_build.rs) = a4a66d449fc9eb99d648d02a041778a68f4f7ce8
 SHA1 (patch-compiler_rustc__target_src_spec_base_netbsd.rs) = 7d910631f49acf2c33fdd191fd3e0f261efae234
 SHA1 (patch-compiler_rustc__target_src_spec_mod.rs) = a22b5d28997ed9a5565deec9c34322165d563d00
diff --git a/rust182/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs b/rust182/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
index d35a82f2b0..cb953e761f 100644
--- a/rust182/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
+++ b/rust182/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
@@ -1,9 +1,9 @@
-$NetBSD: patch-compiler_rustc__codegen__ssa_src_back_linker.rs,v 1.17 2024/07/27 02:35:24 tnn Exp $
+$NetBSD: patch-compiler_rustc__codegen__ssa_src_back_linker.rs,v 1.19 2024/11/25 14:37:35 tnn Exp $
 
 Do not use @rpath on Darwin.
 Find external libunwind on Linux.
 
---- compiler/rustc_codegen_ssa/src/back/linker.rs.orig	2006-07-24 01:21:28.000000000 +0000
+--- compiler/rustc_codegen_ssa/src/back/linker.rs.orig	2024-09-04 15:07:06.000000000 +0000
 +++ compiler/rustc_codegen_ssa/src/back/linker.rs
 @@ -402,7 +402,7 @@ impl<'a> GccLinker<'a> {
              // principled solution at some point to force the compiler to pass
@@ -14,14 +14,14 @@ Find external libunwind on Linux.
                  rpath.push(out_filename.file_name().unwrap());
                  self.link_arg("-install_name").link_arg(rpath);
              }
-@@ -880,6 +880,10 @@ impl<'a> Linker for MsvcLinker<'a> {
+@@ -528,6 +528,10 @@ impl<'a> Linker for GccLinker<'a> {
+     }
  
-     fn link_dylib_by_name(&mut self, name: &str, verbatim: bool, _as_needed: bool) {
-         self.link_arg(format!("{}{}", name, if verbatim { "" } else { ".lib" }));
+     fn link_dylib_by_name(&mut self, name: &str, verbatim: bool, as_needed: bool) {
 +        if self.sess.target.os.contains("linux") && name == "unwind" {
 +            self.link_arg("-rpath,@PREFIX@/lib");
 +            self.link_arg("-L@PREFIX@/lib");
 +        }
-     }
- 
-     fn link_dylib_by_path(&mut self, path: &Path, _as_needed: bool) {
+         if self.sess.target.os == "illumos" && name == "c" {
+             // libc will be added via late_link_args on illumos so that it will
+             // appear last in the library search order.


Home | Main Index | Thread Index | Old Index