Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Florian Franzmann (4186c4600a8afc26c2eab00b9f457fa0567812c9)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Florian Franzmann <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Florian Franzmann (4186c4600a8afc26c2eab00b9f457fa0567812c9)
  • Date: Sat, 2 Jan 2021 14:36:49 +0000

GIT changes to master grimoire by Florian Franzmann
<siflfran AT hawo.stw.uni-erlangen.de>:

crypto/cryptopp/DETAILS
| 4
crypto/cryptopp/HISTORY
| 3
devel/rust/DETAILS
| 14
devel/rust/HISTORY
| 8

devel/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
| 336 ++++++++++
devel/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
| 66 +
devel/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
| 26

devel/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
| 45 +
devel/rust/patches/need-ssp_nonshared.patch
| 23
9 files changed, 508 insertions(+), 17 deletions(-)

New commits:
commit 4186c4600a8afc26c2eab00b9f457fa0567812c9
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

crypto/cryptopp: version 8.4.0

commit adddc33025b71fc0f58186183028e5576653b5b9
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

Revert "devel/rust: version 1.49.0"

This reverts commit db39ffa1cd47df3fc88b32034205c64be941e4ae.

Ismael will do this update as soon as the patches wrt. musl are ready.

diff --git a/crypto/cryptopp/DETAILS b/crypto/cryptopp/DETAILS
index 9b3a1ff..6c8a38e 100755
--- a/crypto/cryptopp/DETAILS
+++ b/crypto/cryptopp/DETAILS
@@ -1,8 +1,8 @@
SPELL=cryptopp
SPELLX=CRYPTOPP
- VERSION=8.3.0
+ VERSION=8.4.0
VERSIONX=`echo ${VERSION} | sed -r "s/\./\_/g"`
-
SOURCE_HASH=sha512:bef0b8bb9b452b491e7e9f68fac98f8d7ca2000e9ca5473cd54050d24f9480905d49ac0223d5b68c55a64a24967d30f6fbc3d08255aaa1a89aaeae5691c1502c
+
SOURCE_HASH=sha512:6cbceb5e662d258f2db018e75e0f196092a8ba75350711b83d6b44b328718b348b6c071d9d0268062fb85cf9220c6a1caf30d408892f5a6f0f8bacfa887ca788
SECURITY_PATCH=4
SOURCE="${SPELLX}_${VERSIONX}.tar.gz"
SOURCE_DIRECTORY="$BUILD_DIRECTORY/${SPELL}-${SPELLX}_${VERSIONX}"
diff --git a/crypto/cryptopp/HISTORY b/crypto/cryptopp/HISTORY
index bd568c7..39b2d8e 100644
--- a/crypto/cryptopp/HISTORY
+++ b/crypto/cryptopp/HISTORY
@@ -1,3 +1,6 @@
+2021-01-02 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS: version 8.4.0
+
2020-12-20 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 8.3.0, SECURITY_PATCH++

diff --git a/devel/rust/DETAILS b/devel/rust/DETAILS
index 7b5e1ab0..b889f0d 100755
--- a/devel/rust/DETAILS
+++ b/devel/rust/DETAILS
@@ -1,5 +1,5 @@
SPELL=rust
- VERSION=1.49.0
+ VERSION=1.48.0
SOURCE_DIRECTORY=$BUILD_DIRECTORY/rustc-$VERSION-src
TMPFS=off
SOURCE=rustc-$VERSION-src.tar.xz
@@ -18,14 +18,14 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/rustc-$VERSION-src
SOURCE2_IGNORE=signature
case "${BUILDX}" in
x86_64-unknown-linux-musl)
-
SOURCE3_HASH=sha512:1655604a69e1e5b0bfca0ed0b5a2d59dc6379f5fcc01d0a23383196f28c4a435d397333c26a3e3ae664280f1951cb3abe2a964c5b7648b518b114253cdcc6f71
-
SOURCE4_HASH=sha512:5456ea31b927d1698ee974ebdbe42ae67a01b847028d275120c39cbf48da1b654e3259c8f4b4ee2c1ae3ec3607169320dbdf7c295f80330ca02ca4fd47de4982
-
SOURCE5_HASH=sha512:0115d2116df97c5a7ce36b3329829f8d5cd28897603f953ce3da740eeaedc49a606ead448f0afcfeb63bb7a4f99cb0988d4c4e56159c651e85347dd6de1f0d38
+
SOURCE3_HASH=sha512:557dde175f5f9469fcab3f46c84a58c1a3d10527cac0a953b8c0f6abaaeeed3938e49f4c06db0d8ee5310cf8cd76ffef380acca8aa58d151a176e94263cde29f
+
SOURCE4_HASH=sha512:0337cc460ffabbc85729fa53314ff8bfad287e67a300f8782a780e047f428b82dc995e58d7c35bdadf8796aa9a5890f726c65def25cd78c5d9b385eb21b4817e
+
SOURCE5_HASH=sha512:c20a247c0f9d116d99082d87a7c8d863b6349dfa2025bdda143f36636a200fa59262e65fa5542879880898931279745bed4591001ba20663291233317e9d5cc8
;;
x86_64-unknown-linux-gnu)
-
SOURCE3_HASH=sha512:bb1bdebdd6fd692cca3ad73538ec1ffe9157eb07382628dbcc7ffaf7f19b9341c100731d43050584572e430a3e97bd73774036dfe3a4b7e00d22598e3d883b0e
-
SOURCE4_HASH=sha512:15589f387602d1b785e9482f42afb449df2add70637ca8314fb2f5d6cb776b61eab431c573cde73eaea8ecf9f12b47baf6ff5d344482e3eec89ba6d3b4e98ebd
-
SOURCE5_HASH=sha512:c3c4094adb2df1c8037434ca959e5e9dd10c4818f45aaf37967f3ba819e6e332a15f1a23039a3a425369453407bcc67d7b6331fcf480227d7d9aa028c7b297c6
+
SOURCE3_HASH=sha512:6b3cc6bd7c1ec9038f44f6392883de4eed3c6ae11368fd0538b6a9797780625607caf99f9e3ca1648499afaf341bc5728c397b7512885d637aee359db8a64811
+
SOURCE4_HASH=sha512:6ff6b9b8e7aa2e0274857ff10e39d594a89356ec7744eb248ac8004fa307c7f0e899832aab62c508236d98aeb4a895c3fb31224b9ac77d39ef86d436c38994b9
+
SOURCE5_HASH=sha512:e139962eb98bccc237bd12a75891f623782b1a1ff667241493f05e2740886b6b7cb22afb7ad4695e29773677fc0a0f8bdee90c03116ea25c13c0b2f7f1a4e0bb
;;
esac
WEB_SITE=https://www.rust-lang.org/
diff --git a/devel/rust/HISTORY b/devel/rust/HISTORY
index 0b88ac8..849ec02 100644
--- a/devel/rust/HISTORY
+++ b/devel/rust/HISTORY
@@ -1,11 +1,3 @@
-2020-12-31 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
- * DETAILS: version 1.49.0
- * patches/{0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch,
- 0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch,
- 0011-Dynamically-link-libc-on-musl-by-default.patch,
- 0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch,
- need-ssp_nonshared.patch}: remove non-applying patches
-
2020-12-29 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: fix checksums for glibc-based bootstrappers

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

b/devel/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
new file mode 100644
index 0000000..326ed1a
--- /dev/null
+++
b/devel/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -0,0 +1,336 @@
+From 4654172e942b5b9250aff70101d54bc880060073 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 04/15] Remove -nostdlib and musl_root from musl targets
+
+---
+ config.toml.example | 3 ---
+ src/bootstrap/cc_detect.rs | 25 ++----------------
+ src/bootstrap/compile.rs | 22 +---------------
+ src/bootstrap/config.rs | 7 ------
+ src/bootstrap/configure.py | 28 ---------------------
+ src/bootstrap/lib.rs | 10 --------
+ src/bootstrap/sanity.rs | 22 ----------------
+ src/librustc_target/spec/linux_musl_base.rs | 16 ------------
+ 8 files changed, 3 insertions(+), 130 deletions(-)
+
+--- a/config.toml.example
++++ b/config.toml.example
+@@ -525,15 +525,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = false
+
+-# 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
+-#musl-root = "..."
+-
+-# The full path to the musl libdir.
+-#musl-libdir = musl-root/lib
+-
+ # The root location of the `wasm32-wasi` sysroot.
+ #wasi-root = "..."
+
+diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
+index a236edf9..54c3cc64 100644
+--- a/src/bootstrap/cc_detect.rs
++++ b/src/bootstrap/cc_detect.rs
+@@ -97,7 +97,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();
+@@ -125,7 +125,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 {
+ false
+@@ -154,7 +154,6 @@ fn set_compiler(
+ compiler: Language,
+ target: Interned<String>,
+ config: Option<&Target>,
+- build: &Build,
+ ) {
+ match &*target {
+ // When compiling for android we may have the NDK configured in the
+@@ -196,26 +195,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 65a00db3..01fd2cf3 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -169,26 +169,7 @@
+ t!(fs::create_dir_all(&libdir_self_contained));
+ let mut target_deps = vec![];
+
+- // Copies the 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();
+- for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+- copy_and_stamp(
+- builder,
+- &libdir_self_contained,
+- &srcdir,
+- obj,
+- &mut target_deps,
+- DependencyType::TargetSelfContained,
+- );
+- }
+- } else if target.ends_with("-wasi") {
++ if target.ends_with("-wasi") {
+ let srcdir =
builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
+ copy_and_stamp(
+ builder,
+@@ -263,15 +244,6 @@
+ .arg("--manifest-path")
+ .arg(builder.src.join("src/libtest/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 56164b74..8c46334a 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -154,8 +154,6 @@
+ pub print_step_timings: bool,
+ 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>,
+@@ -252,8 +250,6 @@
+ pub linker: Option<PathBuf>,
+ pub ndk: Option<PathBuf>,
+ 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,
+@@ -438,7 +434,6 @@
+ parallel_compiler: Option<bool>,
+ default_linker: Option<String>,
+ channel: Option<String>,
+- musl_root: Option<String>,
+ rpath: Option<bool>,
+ verbose_tests: Option<bool>,
+ optimize_tests: Option<bool>,
+@@ -475,8 +470,6 @@
+ llvm_filecheck: Option<String>,
+ android_ndk: Option<String>,
+ crt_static: Option<bool>,
+- musl_root: Option<String>,
+- musl_libdir: Option<String>,
+ wasi_root: Option<String>,
+ qemu_rootfs: Option<String>,
+ no_std: Option<bool>,
+@@ -806,7 +799,6 @@
+ 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);
+@@ -846,8 +838,6 @@
+ 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);
+
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index 2a46c563..025928b9 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -110,34 +110,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",
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -876,25 +876,6 @@
+ }
+ }
+
+- /// 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 530e74da..8ec9f046 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -191,28 +191,6 @@
+ }
+ }
+
+- // 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.clone()).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"
+- ),
+- }
+- }
+-
+ if target.contains("msvc") {
+ // There are three builds of cmake on windows: MSVC, MinGW, and
+ // Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/librustc_target/spec/linux_musl_base.rs
b/src/librustc_target/spec/linux_musl_base.rs
+index e294e639..58ae91a9 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -10,10 +10,6 @@
+ // argument is *not* necessary for normal builds, but it can't hurt!
+
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
+
+- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+- base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+-
+ // These targets statically link libc by default
+ base.crt_static_default = true;
+ // These targets allow the user to choose between static and dynamic
linking.
+--- a/compiler/rustc_target/src/spec/crt_objects.rs.orig 2020-08-07
01:01:58.142394507 +0200
++++ b/compiler/rustc_target/src/spec/crt_objects.rs 2020-08-07
01:02:25.030392771 +0200
+@@ -61,21 +61,6 @@
+ ])
+ }
+
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+- (LinkOutputKind::DynamicDylib, &["crti.o"]),
+- (LinkOutputKind::StaticDylib, &["crti.o"]),
+- ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+- all("crtn.o")
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+ new(&[
+ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
+--
+2.26.2
diff --git
a/devel/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
b/devel/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
new file mode 100644
index 0000000..6571cb3
--- /dev/null
+++ b/devel/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
@@ -0,0 +1,66 @@
+From a640bce17d908a0691d53f22e5257353f694d9b6 Mon Sep 17 00:00:00 2001
+From: q66 <daniel AT octaforge.org>
+Date: Sun, 3 May 2020 17:55:50 +0200
+Subject: [PATCH 05/15] Prefer libgcc_eh over libunwind on musl
+
+---
+ src/libunwind/build.rs | 16 ++--------------
+ src/libunwind/lib.rs | 2 +-
+ 2 files changed, 3 insertions(+), 15 deletions(-)
+
+diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
+index a24808b3..a1250889 100644
+--- a/library/unwind/build.rs
++++ b/library/unwind/build.rs
+@@ -5,17 +5,14 @@
+ let target = env::var("TARGET").expect("TARGET was not set");
+
+ if cfg!(feature = "llvm-libunwind")
+- && ((target.contains("linux") && !target.contains("musl")) ||
target.contains("fuchsia"))
++ && (target.contains("linux") || target.contains("fuchsia"))
+ {
+ // Build the unwinding from libunwind C/C++ source code.
+ llvm_libunwind::compile();
+ } else if target.contains("x86_64-fortanix-unknown-sgx") {
+ llvm_libunwind::compile();
+ } else if target.contains("linux") {
+- if target.contains("musl") {
+- // linking for musl is handled in lib.rs
+- llvm_libunwind::compile();
+- } else if !target.contains("android") {
++ if !target.contains("android") {
+ println!("cargo:rustc-link-lib=gcc_s");
+ }
+ } else if target.contains("freebsd") {
+@@ -145,15 +142,6 @@
+ cfg.file(root.join("src").join(src));
+ }
+
+- if target_env == "musl" {
+- // use the same C compiler command to compile C++ code so we do
not need to setup the
+- // C++ compiler env variables on the builders
+- cfg.cpp(false);
+- // linking for musl is handled in lib.rs
+- cfg.cargo_metadata(false);
+- println!("cargo:rustc-link-search=native={}",
env::var("OUT_DIR").unwrap());
+- }
+-
+ cfg.compile("unwind");
+ }
+ }
+diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
+index 18d41be7..17f73d69 100644
+--- a/library/unwind/src/lib.rs
++++ b/library/unwind/src/lib.rs
+@@ -19,7 +19,7 @@ cfg_if::cfg_if! {
+ }
+
+ #[cfg(target_env = "musl")]
+-#[link(name = "unwind", kind = "static", cfg(target_feature =
"crt-static"))]
++#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+ extern "C" {}
+
+--
+2.26.2
+
diff --git
a/devel/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
b/devel/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
new file mode 100644
index 0000000..7f6ca13
--- /dev/null
+++ b/devel/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
@@ -0,0 +1,26 @@
+From d72ad9c226b4ed225c23d88ec5dbe6ba321b37ad Mon Sep 17 00:00:00 2001
+From: q66 <daniel AT octaforge.org>
+Date: Sat, 21 Dec 2019 17:04:13 +0100
+Subject: [PATCH 11/15] Dynamically link libc on musl by default
+
+---
+ src/librustc_target/spec/linux_musl_base.rs | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/librustc_target/spec/linux_musl_base.rs
b/src/librustc_target/spec/linux_musl_base.rs
+index 58ae91a9..1fae72d6 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -1,11 +1,9 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::TargetOptions;
+
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+- // These targets statically link libc by default
+- base.crt_static_default = true;
++ base.crt_static_default = false;
+ // These targets allow the user to choose between static and dynamic
linking.
+ base.crt_static_respected = true;
+
diff --git
a/devel/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch

b/devel/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
new file mode 100644
index 0000000..e4d4f14
--- /dev/null
+++
b/devel/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -0,0 +1,45 @@
+From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From: q66 <daniel AT octaforge.org>
+Date: Sun, 3 May 2020 18:02:03 +0200
+Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+
+---
+ vendor/libc/src/lib.rs | 1 +
+ vendor/libc/src/unix/mod.rs | 6 +++---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/vendor/libc/src/lib.rs b/vendor/libc/src/lib.rs
+index 0b1496af..7f7e85a7 100644
+--- a/vendor/libc/src/lib.rs
++++ b/vendor/libc/src/lib.rs
+@@ -33,6 +33,7 @@
+ #![deny(missing_copy_implementations, safe_packed_borrows)]
+ #![no_std]
+ #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
++#![cfg_attr(feature = "rustc-dep-of-std", feature(static_nobundle))]
+ #![cfg_attr(target_os = "redox", feature(static_nobundle))]
+ #![cfg_attr(libc_const_extern_fn, feature(const_extern_fn))]
+
+diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
+index 238da24b..ffb05ee7 100644
+--- a/vendor/libc/src/unix/mod.rs
++++ b/vendor/libc/src/unix/mod.rs
+@@ -299,11 +299,11 @@ cfg_if! {
+ // cargo build, don't pull in anything extra as the libstd dep
+ // already pulls in all libs.
+ } else if #[cfg(target_env = "musl")] {
++ #[link(name = "c")]
++ extern {}
+ #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", kind = "static",
++ link(name = "gcc", kind = "static-nobundle",
+ cfg(target_feature = "crt-static")))]
+- #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", cfg(not(target_feature =
"crt-static"))))]
+ extern {}
+ } else if #[cfg(target_os = "emscripten")] {
+ #[link(name = "c")]
+index 0b1496af..7f7e85a7 100644
+--
+2.26.2
+
diff --git a/devel/rust/patches/need-ssp_nonshared.patch
b/devel/rust/patches/need-ssp_nonshared.patch
new file mode 100644
index 0000000..44c6dc2
--- /dev/null
+++ b/devel/rust/patches/need-ssp_nonshared.patch
@@ -0,0 +1,23 @@
+--- rustc-1.47.0-src/library/std/build.rs.orig
++++ rustc-1.47.0-src/library/std/build.rs
+@@ -8,6 +8,8 @@
+ println!("cargo:rustc-link-lib=dl");
+ println!("cargo:rustc-link-lib=log");
+ println!("cargo:rustc-link-lib=gcc");
++ } else if target.contains("musl") {
++ println!("cargo:rustc-link-lib=ssp_nonshared");
+ }
+ } else if target.contains("freebsd") {
+ println!("cargo:rustc-link-lib=execinfo");
+--- rustc-1.44.0-src/library/unwind/build.rs.orig
++++ rustc-1.44.0-src/library/unwind/build.rs
+@@ -12,6 +12,9 @@ fn main() {
+ } else if target.contains("linux") {
+ if !target.contains("android") {
+ println!("cargo:rustc-link-lib=gcc_s");
++ if target.contains("musl") {
++ println!("cargo:rustc-link-lib=ssp_nonshared");
++ }
+ }
+ } else if target.contains("freebsd") {
+ println!("cargo:rustc-link-lib=gcc_s");



  • [SM-Commit] GIT changes to master grimoire by Florian Franzmann (4186c4600a8afc26c2eab00b9f457fa0567812c9), Florian Franzmann, 01/02/2021

Archive powered by MHonArc 2.6.24.

Top of Page