Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (eff6e65beb7b0c17508a95905d7cac934626f2fa)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (eff6e65beb7b0c17508a95905d7cac934626f2fa)
  • Date: Sun, 14 May 2023 23:48:29 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

devel/rust/DETAILS
| 1
devel/rust/HISTORY
| 9

devel/rust/patches/0003-Remove-nostdlib-and-musl_root-from-musl-targets.patch
| 378 ++++++++++
devel/rust/patches/0004-fix-shebang-on-install-template.sh.patch
| 25
devel/rust/patches/0007-Link-stage2-tools-dynamically-to-libstd.patch
| 2

devel/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
| 2

devel/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
| 78 ++
gnome2-libs/librsvg2/DETAILS
| 1
8 files changed, 494 insertions(+), 2 deletions(-)

New commits:
commit eff6e65beb7b0c17508a95905d7cac934626f2fa
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

librsvg2: Add Watch line

commit b6db2bc43302449959cb9bc1112c96086a3bd87d
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

rust: Fix build against musl

diff --git a/devel/rust/DETAILS b/devel/rust/DETAILS
index 5742a8d..a4dd558 100755
--- a/devel/rust/DETAILS
+++ b/devel/rust/DETAILS
@@ -1,5 +1,6 @@
SPELL=rust
VERSION=1.69.0
+ PATCHLEVEL=1
SECURITY_PATCH=2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/rustc-$VERSION-src
TMPFS=off
diff --git a/devel/rust/HISTORY b/devel/rust/HISTORY
index 8ba67de..60dfe8f 100644
--- a/devel/rust/HISTORY
+++ b/devel/rust/HISTORY
@@ -1,3 +1,12 @@
+2023-05-14 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: PATCHLEVEL++
+ * patches/0003-Remove-nostdlib-and-musl_root-from-musl-targets.patch,
+ patches/0004-fix-shebang-on-install-template.sh.patch,
+ patches/0007-Link-stage2-tools-dynamically-to-libstd.patch,
+
patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch,
+
patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch:
+ fixed build against musl
+
2023-04-20 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 1.69.0

diff --git
a/devel/rust/patches/0003-Remove-nostdlib-and-musl_root-from-musl-targets.patch

b/devel/rust/patches/0003-Remove-nostdlib-and-musl_root-from-musl-targets.patch
new file mode 100644
index 0000000..eda3b72
--- /dev/null
+++
b/devel/rust/patches/0003-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -0,0 +1,378 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel AT sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 03/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+
+Upstream-Status: Inappropriate
+Origin: Void Linux
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs | 7 ---
+ config.toml.example | 8 ----
+ src/bootstrap/cc_detect.rs | 25 +----------
+ src/bootstrap/compile.rs | 43 +------------------
+ src/bootstrap/config.rs | 9 ----
+ src/bootstrap/configure.py | 28 ------------
+ src/bootstrap/lib.rs | 19 --------
+ src/bootstrap/sanity.rs | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
+diff --git a/compiler/rustc_target/src/spec/crt_objects.rs
b/compiler/rustc_target/src/spec/crt_objects.rs
+index c126390f5..7aef73d3b 100644
+--- a/compiler/rustc_target/src/spec/crt_objects.rs
++++ b/compiler/rustc_target/src/spec/crt_objects.rs
+@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
+ ])
+ }
+
+-pub(super) fn pre_musl_self_contained() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o",
"crtbegin.o"]),
+- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o",
"crtbeginS.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o",
"crtbegin.o"]),
+- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o",
"crtbeginS.o"]),
+- (LinkOutputKind::DynamicDylib, &["crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::StaticDylib, &["crti.o", "crtbeginS.o"]),
+- ])
+-}
+-
+-pub(super) fn post_musl_self_contained() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::StaticPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::DynamicDylib, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticDylib, &["crtendS.o", "crtn.o"]),
+- ])
+-}
+-
+ pub(super) fn pre_mingw_self_contained() -> CrtObjects {
+ new(&[
+ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
+diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs
b/compiler/rustc_target/src/spec/linux_musl_base.rs
+index 61553e71b..88f807a58 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -1,16 +1,9 @@
+-use crate::spec::crt_objects::{self, LinkSelfContainedDefault};
+ use crate::spec::TargetOptions;
+
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+ base.env = "musl".into();
+- base.pre_link_objects_self_contained =
crt_objects::pre_musl_self_contained();
+- base.post_link_objects_self_contained =
crt_objects::post_musl_self_contained();
+- base.link_self_contained = LinkSelfContainedDefault::Musl;
+-
+- // These targets statically link libc by default
+- base.crt_static_default = true;
+
+ base
+ }
+diff --git a/config.toml.example b/config.toml.example
+index ca54cbd2d..beec9bb04 100644
+--- a/config.toml.example
++++ b/config.toml.example
+@@ -540,14 +540,6 @@ changelog-seen = 2
+ # behavior -- this may lead to miscompilations or other bugs.
+ #description = <none> (string)
+
+-# The root location of the musl installation directory. The library
directory
+-# will also need to contain libunwind.a for an unwinding implementation.
Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries.
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
+-
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
+diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
+index 7128d542a..668245f3c 100644
+--- a/src/bootstrap/cc_detect.rs
++++ b/src/bootstrap/cc_detect.rs
+@@ -101,7 +101,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
+ cfg.compiler(cc);
+ } else {
+- set_compiler(&mut cfg, Language::C, target, config, build);
++ set_compiler(&mut cfg, Language::C, target, config);
+ }
+
+ let compiler = cfg.get_compiler();
+@@ -122,7 +122,7 @@ pub fn find(build: &mut Build) {
+ cfg.compiler(cxx);
+ true
+ } else if build.hosts.contains(&target) || build.build == target {
+- set_compiler(&mut cfg, Language::CPlusPlus, target, config,
build);
++ set_compiler(&mut cfg, Language::CPlusPlus, target, config);
+ true
+ } else {
+ // Use an auto-detected compiler (or one configured via
`CXX_target_triple` env vars).
+@@ -158,7 +158,6 @@ fn set_compiler(
+ compiler: Language,
+ target: TargetSelection,
+ config: Option<&Target>,
+- build: &Build,
+ ) {
+ match &*target.triple {
+ // When compiling for android we may have the NDK configured in the
+@@ -194,26 +193,6 @@ fn set_compiler(
+ }
+ }
+
+- "mips-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mips-linux-musl-gcc");
+- }
+- }
+- "mipsel-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mipsel-linux-musl-gcc");
+- }
+- }
+-
+- t if t.contains("musl") => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() {
+- cfg.compiler(guess);
+- }
+- }
+- }
+-
+ _ => {}
+ }
+ }
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index 0deed3f99..0bddac5d1 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -228,39 +228,7 @@ fn copy_self_contained_objects(
+ let mut target_deps = vec![];
+
+ // Copies the libc and CRT objects.
+- //
+- // rustc historically provides a more self-contained installation for
musl targets
+- // not requiring the presence of a native musl toolchain. For example,
it can fall back
+- // to using gcc from a glibc-targeting toolchain for linking.
+- // To do that we have to distribute musl startup objects as a part of
Rust toolchain
+- // and link with them manually in the self-contained mode.
+- if target.contains("musl") {
+- let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
+- panic!("Target {:?} does not have a \"musl-libdir\" key",
target.triple)
+- });
+- for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o",
"crtn.o"] {
+- copy_and_stamp(
+- builder,
+- &libdir_self_contained,
+- &srcdir,
+- obj,
+- &mut target_deps,
+- DependencyType::TargetSelfContained,
+- );
+- }
+- let crt_path = builder.ensure(native::CrtBeginEnd { target });
+- for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"]
{
+- let src = crt_path.join(obj);
+- let target = libdir_self_contained.join(obj);
+- builder.copy(&src, &target);
+- target_deps.push((target, DependencyType::TargetSelfContained));
+- }
+-
+- if !target.starts_with("s390x") {
+- let libunwind_path = copy_llvm_libunwind(builder, target,
&libdir_self_contained);
+- target_deps.push((libunwind_path,
DependencyType::TargetSelfContained));
+- }
+- } else if target.ends_with("-wasi") {
++ if target.ends_with("-wasi") {
+ let srcdir = builder
+ .wasi_root(target)
+ .unwrap_or_else(|| {
+@@ -344,15 +312,6 @@ pub fn std_cargo(builder: &Builder<'_>, target:
TargetSelection, stage: u32, car
+ .arg("--manifest-path")
+ .arg(builder.src.join("library/test/Cargo.toml"));
+
+- // Help the libc crate compile by assisting it in finding various
+- // sysroot native libraries.
+- if target.contains("musl") {
+- if let Some(p) = builder.musl_libdir(target) {
+- let root = format!("native={}", p.to_str().unwrap());
+- cargo.rustflag("-L").rustflag(&root);
+- }
+- }
+-
+ if target.ends_with("-wasi") {
+ if let Some(p) = builder.wasi_root(target) {
+ let root = format!("native={}/lib/wasm32-wasi",
p.to_str().unwrap());
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index d8c15c76e..53f95e49b 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -200,7 +200,6 @@ pub struct Config {
+ pub missing_tools: bool,
+
+ // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub datadir: Option<PathBuf>,
+@@ -440,8 +439,6 @@ pub struct Target {
+ pub sanitizers: Option<bool>,
+ pub profiler: Option<bool>,
+ pub crt_static: Option<bool>,
+- pub musl_root: Option<PathBuf>,
+- pub musl_libdir: Option<PathBuf>,
+ pub wasi_root: Option<PathBuf>,
+ pub qemu_rootfs: Option<PathBuf>,
+ pub no_std: bool,
+@@ -734,7 +731,6 @@ define_config! {
+ default_linker: Option<String> = "default-linker",
+ channel: Option<String> = "channel",
+ description: Option<String> = "description",
+- musl_root: Option<String> = "musl-root",
+ rpath: Option<bool> = "rpath",
+ verbose_tests: Option<bool> = "verbose-tests",
+ optimize_tests: Option<bool> = "optimize-tests",
+@@ -781,8 +777,6 @@ define_config! {
+ sanitizers: Option<bool> = "sanitizers",
+ profiler: Option<bool> = "profiler",
+ crt_static: Option<bool> = "crt-static",
+- musl_root: Option<String> = "musl-root",
+- musl_libdir: Option<String> = "musl-libdir",
+ wasi_root: Option<String> = "wasi-root",
+ qemu_rootfs: Option<String> = "qemu-rootfs",
+ no_std: Option<bool> = "no-std",
+@@ -1187,7 +1181,6 @@ impl Config {
+ set(&mut config.llvm_tools_enabled, rust.llvm_tools);
+ config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
+ config.rustc_default_linker = rust.default_linker;
+- config.musl_root = rust.musl_root.map(PathBuf::from);
+ config.save_toolstates =
rust.save_toolstates.map(PathBuf::from);
+ set(&mut config.deny_warnings,
flags.deny_warnings.or(rust.deny_warnings));
+ set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
+@@ -1251,8 +1244,6 @@ impl Config {
+ target.ranlib = cfg.ranlib.map(PathBuf::from);
+ target.linker = cfg.linker.map(PathBuf::from);
+ target.crt_static = cfg.crt_static;
+- target.musl_root = cfg.musl_root.map(PathBuf::from);
+- target.musl_libdir = cfg.musl_libdir.map(PathBuf::from);
+ target.wasi_root = cfg.wasi_root.map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
+ target.sanitizers = cfg.sanitizers;
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index 6b139decb..a2e19b8f4 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -112,34 +112,6 @@ v("aarch64-linux-android-ndk",
"target.aarch64-linux-android.android-ndk",
+ "aarch64-linux-android NDK standalone path")
+ v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
+ "x86_64-linux-android NDK standalone path")
+-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
+- "MUSL root installation directory (deprecated)")
+-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
+- "x86_64-unknown-linux-musl install directory")
+-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
+- "i586-unknown-linux-musl install directory")
+-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
+- "i686-unknown-linux-musl install directory")
+-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
+- "arm-unknown-linux-musleabi install directory")
+-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
+- "arm-unknown-linux-musleabihf install directory")
+-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
+- "armv5te-unknown-linux-musleabi install directory")
+-v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root",
+- "armv7-unknown-linux-musleabi install directory")
+-v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root",
+- "armv7-unknown-linux-musleabihf install directory")
+-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
+- "aarch64-unknown-linux-musl install directory")
+-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
+- "mips-unknown-linux-musl install directory")
+-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
+- "mipsel-unknown-linux-musl install directory")
+-v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
+- "mips64-unknown-linux-muslabi64 install directory")
+-v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
+- "mips64el-unknown-linux-muslabi64 install directory")
+ v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
+ "rootfs in qemu testing, you probably don't want to use this")
+ v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 3ed534523..c7c7a75f0 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -1181,25 +1181,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: TargetSelection) -> Option<&Path> {
+- self.config
+- .target_config
+- .get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or_else(|| self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+- /// Returns the "musl libdir" for this `target`.
+- fn musl_libdir(&self, target: TargetSelection) -> Option<PathBuf> {
+- let t = self.config.target_config.get(&target)?;
+- if let libdir @ Some(_) = &t.musl_libdir {
+- return libdir.clone();
+- }
+- self.musl_root(target).map(|root| root.join("lib"))
+- }
+-
+ /// Returns the sysroot for the wasi target, if defined
+ fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
+ self.config.target_config.get(&target).and_then(|t|
t.wasi_root.as_ref()).map(|p| &**p)
+diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
+index 8a40b0f64..59e11d304 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -11,7 +11,6 @@
+ use std::collections::HashMap;
+ use std::env;
+ use std::ffi::{OsStr, OsString};
+-use std::fs;
+ use std::path::PathBuf;
+ use std::process::Command;
+
+@@ -205,28 +204,6 @@ than building it.
+ }
+ }
+
+- // Make sure musl-root is valid
+- if target.contains("musl") {
+- // If this is a native target (host is also musl) and no
musl-root is given,
+- // fall back to the system toolchain in /usr before giving up
+- if build.musl_root(*target).is_none() && build.config.build ==
*target {
+- let target =
build.config.target_config.entry(*target).or_default();
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_libdir(*target) {
+- Some(libdir) => {
+- if fs::metadata(libdir.join("libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl libdir: {}",
libdir.display());
+- }
+- }
+- None => panic!(
+- "when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option
must \
+- be specified in config.toml"
+- ),
+- }
+- }
+-
+ // Some environments don't want or need these tools, such as when
testing Miri.
+ // FIXME: it would be better to refactor this code to split
necessary setup from pure sanity
+ // checks, and have a regular flag for skipping the latter. Also see
diff --git a/devel/rust/patches/0004-fix-shebang-on-install-template.sh.patch
b/devel/rust/patches/0004-fix-shebang-on-install-template.sh.patch
new file mode 100644
index 0000000..bcca7c3
--- /dev/null
+++ b/devel/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -0,0 +1,25 @@
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel AT octaforge.org>
+Date: Mon, 20 Dec 2021 00:55:18 +0100
+Subject: [PATCH 04/15] fix shebang on install-template.sh
+
+Upstream-Status: Unknown
+Origin: Void Linux
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/tools/rust-installer/install-template.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/tools/rust-installer/install-template.sh
b/src/tools/rust-installer/install-template.sh
+index e68be8911..beaa90f7b 100644
+--- a/src/tools/rust-installer/install-template.sh
++++ b/src/tools/rust-installer/install-template.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+ # file at the top-level directory of this distribution and at
+ # http://rust-lang.org/COPYRIGHT.
+--
+2.37.2
+
diff --git
a/devel/rust/patches/0007-Link-stage2-tools-dynamically-to-libstd.patch
b/devel/rust/patches/0007-Link-stage2-tools-dynamically-to-libstd.patch
index 85b06e1..e5836a7 100644
--- a/devel/rust/patches/0007-Link-stage2-tools-dynamically-to-libstd.patch
+++ b/devel/rust/patches/0007-Link-stage2-tools-dynamically-to-libstd.patch
@@ -1,5 +1,5 @@
From 92e56e048bbb925ea3e8fde2e17b9fb10a961bb2 Mon Sep 17 00:00:00 2001
-From: q66 <daniel AT octaforge.org>
+From: Daniel Kolesa <daniel AT octaforge.org>
Date: Sun, 3 May 2020 18:00:09 +0200
Subject: [PATCH 07/10] Link stage2 tools dynamically to libstd

diff --git
a/devel/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch

b/devel/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 3720335..3e8e16f 100644
---
a/devel/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++
b/devel/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,5 +1,5 @@
From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
-From: q66 <daniel AT octaforge.org>
+From: Daniel Kolesa <daniel AT octaforge.org>
Date: Sun, 3 May 2020 18:02:03 +0200
Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate

diff --git
a/devel/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch

b/devel/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
new file mode 100644
index 0000000..97ea9b7
--- /dev/null
+++
b/devel/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -0,0 +1,78 @@
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel AT octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+
+Upstream-Status: Unknown
+Origin: Void Linux
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs | 3 +++
+ src/bootstrap/lib.rs | 4 ++++
+ 3 files changed, 11 insertions(+)
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index 6a02a225c..483aa8818 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
+ }
+ }
+
++ if let Some(sysroot) = self.native_sysroot(target) {
++ rustflags.arg(&format!("-Clink-args=--sysroot={}",
sysroot.display()));
++ }
++
+ if let Some(host_linker) = self.linker(compiler.host) {
+ cargo.env("RUSTC_HOST_LINKER", host_linker);
+ }
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 18a764689..f8b9bbd96 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -395,6 +395,7 @@ pub struct Target {
+ pub ranlib: Option<PathBuf>,
+ pub default_linker: Option<PathBuf>,
+ pub linker: Option<PathBuf>,
++ pub sysroot: Option<PathBuf>,
+ pub ndk: Option<PathBuf>,
+ pub sanitizers: Option<bool>,
+ pub profiler: Option<bool>,
+@@ -723,6 +724,7 @@ define_config! {
+ ranlib: Option<String> = "ranlib",
+ default_linker: Option<PathBuf> = "default-linker",
+ linker: Option<String> = "linker",
++ sysroot: Option<String> = "sysroot",
+ llvm_config: Option<String> = "llvm-config",
+ llvm_filecheck: Option<String> = "llvm-filecheck",
+ llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
+ target.ar = cfg.ar.map(PathBuf::from);
+ target.ranlib = cfg.ranlib.map(PathBuf::from);
+ target.linker = cfg.linker.map(PathBuf::from);
++ target.sysroot = cfg.sysroot.map(PathBuf::from);
+ target.crt_static = cfg.crt_static;
+ target.wasi_root = cfg.wasi_root.map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 0a7012dbd..cded50d20 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -1152,6 +1152,10 @@ impl Build {
+ self.config.target_config.get(&target).and_then(|t|
t.crt_static)
+ }
+ }
++
++ fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
++ self.config.target_config.get(&target).and_then(|c|
c.sysroot.as_ref()).map(|p| &**p)
++ }
+
+ /// Returns the sysroot for the wasi target, if defined
+ fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
+--
+2.37.2
+
diff --git a/gnome2-libs/librsvg2/DETAILS b/gnome2-libs/librsvg2/DETAILS
index 908530b..51949a4 100755
--- a/gnome2-libs/librsvg2/DETAILS
+++ b/gnome2-libs/librsvg2/DETAILS
@@ -1,3 +1,4 @@
+# Watch: https://gitlab.gnome.org/GNOME/librsvg/-/tags
librsvg-([0-9.]+)[.]tar"
SPELL=librsvg2
VERSION=2.55.1

SOURCE_HASH=sha256:6baf48a9d3a56fd13bbfbb9f1f76759b240b70a1fa220fd238474d66a926f98c:UPSTREAM_HHASH



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (eff6e65beb7b0c17508a95905d7cac934626f2fa), Ismael Luceno, 05/14/2023

Archive powered by MHonArc 2.6.24.

Top of Page