From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1599382-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 6D09E15815E
	for <garchives@archives.gentoo.org>; Sun, 11 Feb 2024 06:01:48 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D45F6E29FC;
	Sun, 11 Feb 2024 06:01:46 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6AB8FE29F0
	for <gentoo-commits@lists.gentoo.org>; Sun, 11 Feb 2024 06:01:46 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 3D0CF343190
	for <gentoo-commits@lists.gentoo.org>; Sun, 11 Feb 2024 06:01:45 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 97BB7AE3
	for <gentoo-commits@lists.gentoo.org>; Sun, 11 Feb 2024 06:01:43 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1707631190.051355c623854159c59fa1af75c4fbb7dbb8993e.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch dev-lang/rust/rust-1.75.0-r1.ebuild dev-lang/rust/rust-1.75.0.ebuild
X-VCS-Directories: dev-lang/rust/files/ dev-lang/rust/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 051355c623854159c59fa1af75c4fbb7dbb8993e
X-VCS-Branch: master
Date: Sun, 11 Feb 2024 06:01:43 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 69cb3806-4312-43bd-b425-49a4354e718c
X-Archives-Hash: a15395044a2085163d64f494ab344a8a

commit:     051355c623854159c59fa1af75c4fbb7dbb8993e
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Sun Feb 11 01:47:25 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 11 05:59:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=051355c6

dev-lang/rust: rebase and re-apply musl dynamic linking patch for 1.75

This somehow got lost in the 1.75 bump, but it is required for e.g.
Firefox to compile on musl.

Bug: https://bugs.gentoo.org/922880
Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/35267
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch | 19 +++++++++++++++++++
 .../{rust-1.75.0.ebuild => rust-1.75.0-r1.ebuild}     |  1 +
 2 files changed, 20 insertions(+)

diff --git a/dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch b/dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch
new file mode 100644
index 000000000000..7dc34f8ad6b8
--- /dev/null
+++ b/dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch
@@ -0,0 +1,19 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+ 
+     // These targets statically link libc by default
+-    base.crt_static_default = true;
++    base.crt_static_default = false;
+ 
+     base
+ }
+-- 
+2.35.1

diff --git a/dev-lang/rust/rust-1.75.0.ebuild b/dev-lang/rust/rust-1.75.0-r1.ebuild
similarity index 99%
rename from dev-lang/rust/rust-1.75.0.ebuild
rename to dev-lang/rust/rust-1.75.0-r1.ebuild
index 1c9761e003fe..19b85fcb4ae6 100644
--- a/dev-lang/rust/rust-1.75.0.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r1.ebuild
@@ -163,6 +163,7 @@ RESTRICT="test"
 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
 
 PATCHES=(
+	"${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
 	"${FILESDIR}"/1.74.1-cross-compile-libz.patch
 	#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch  # pending refresh
 	"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch