Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (b05ffb2c70c84b5893f105667f33e495b39202b0)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (b05ffb2c70c84b5893f105667f33e495b39202b0)
  • Date: Fri, 30 Jul 2021 02:51:28 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemaage.org>:

devel/rust/DEPENDS
| 2
devel/rust/DETAILS
| 14
devel/rust/HISTORY
| 5

devel/rust/patches/0001-Allow-to-build-against-libressl-3.2.x-and-3.3.x.patch
| 12

devel/rust/patches/0003-Remove-nostdlib-and-musl_root-from-musl-targets.patch
| 346 ----------
devel/rust/patches/0004-Prefer-libgcc_eh-over-libunwind-on-musl.patch
| 65 -
devel/rust/patches/0006-Link-with-ssp_nonshared.patch
| 61 -
devel/rust/patches/0009-Dynamically-link-libc-on-musl-by-default.patch
| 32
8 files changed, 17 insertions(+), 520 deletions(-)

New commits:
commit b05ffb2c70c84b5893f105667f33e495b39202b0
Author: Pavel Vinogradov <public AT sourcemaage.org>
Commit: Pavel Vinogradov <public AT sourcemaage.org>

devel/rust: version 1.54.0

diff --git a/devel/rust/DEPENDS b/devel/rust/DEPENDS
index dd516c3..0eed5aa 100755
--- a/devel/rust/DEPENDS
+++ b/devel/rust/DEPENDS
@@ -1,6 +1,6 @@
. "$GRIMOIRE"/VDEPENDS &&
vdepends <<EOF &&
- llvm >= 11.0 < 12.0
+ llvm >= 11.0
gcc[CXX]
curl
flex
diff --git a/devel/rust/DETAILS b/devel/rust/DETAILS
index 7b5e1ab0..622ff89 100755
--- a/devel/rust/DETAILS
+++ b/devel/rust/DETAILS
@@ -1,5 +1,5 @@
SPELL=rust
- VERSION=1.49.0
+ VERSION=1.54.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:7facedcd46fd1d2820118b4fa07ad49ca34730ce08791a465c440b1537ce8ea66e841e9a0735b5b7b52bd13a672c8540673570275859a7d45abb7c1797300297
+
SOURCE4_HASH=sha512:2386c57d563d17aa889d09eac2c84d1bdb2039e4a66995fe5e0cafece7766fb56e1506a0191ed3c220b8facba5cbbc9272414ffc232092eb60a078cdeb4c2234
+
SOURCE5_HASH=sha512:15dfa660c977feab1b0e985586bf90c5e987743e724286f8185413e965c1e146414540cdb870a35c7179ff45e28aa3fd228b29eb02ae19e77ba7da88b3f74dbd
;;
x86_64-unknown-linux-gnu)
-
SOURCE3_HASH=sha512:bb1bdebdd6fd692cca3ad73538ec1ffe9157eb07382628dbcc7ffaf7f19b9341c100731d43050584572e430a3e97bd73774036dfe3a4b7e00d22598e3d883b0e
-
SOURCE4_HASH=sha512:15589f387602d1b785e9482f42afb449df2add70637ca8314fb2f5d6cb776b61eab431c573cde73eaea8ecf9f12b47baf6ff5d344482e3eec89ba6d3b4e98ebd
-
SOURCE5_HASH=sha512:c3c4094adb2df1c8037434ca959e5e9dd10c4818f45aaf37967f3ba819e6e332a15f1a23039a3a425369453407bcc67d7b6331fcf480227d7d9aa028c7b297c6
+
SOURCE3_HASH=sha512:f113c8a59888fef6ba8f3fdd555456625050de8616b60dc4f7fdf4602f8f8754fb0014169a4670d027c8060c1cd0f2dfaca2832e664314f6f0714e8d9535c2ca
+
SOURCE4_HASH=sha512:330a347a7633a00bd3e5cc6f37e9ba5db7acbf87d7fc7a6ddd53efbdcf918f52d66310921bac3125caf1106c7f6300bbbf897a10009800418ddad51b9c6f8085
+
SOURCE5_HASH=sha512:4f624af9e35be3037c32bf25618049b3101ea8d00e23164d49651f8b2dbf4ca24689bc13a8b68241a22fb9ec0390f421837a3a11ec816cf81791f8682db19cc8
;;
esac
WEB_SITE=https://www.rust-lang.org/
diff --git a/devel/rust/HISTORY b/devel/rust/HISTORY
index cab77eb..f924512 100644
--- a/devel/rust/HISTORY
+++ b/devel/rust/HISTORY
@@ -1,3 +1,8 @@
+2021-07-29 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 1.54.0
+ * DEPENDS: allow llvm >= 12.0
+ * patches/*: updated libressl patch, dropped musl patches
+
2021-01-07 Ismael Luceno <ismael AT iodev.co.uk>
* patches/0001-{libressl-version-check =>
Allow-to-build-against-libressl-3.2.x-and-3.3.x}.patch,
patches/000{1 => 2}-Fix-LLVM-build.patch,
diff --git
a/devel/rust/patches/0001-Allow-to-build-against-libressl-3.2.x-and-3.3.x.patch

b/devel/rust/patches/0001-Allow-to-build-against-libressl-3.2.x-and-3.3.x.patch
index 472956e..54fc552 100644
---
a/devel/rust/patches/0001-Allow-to-build-against-libressl-3.2.x-and-3.3.x.patch
+++
b/devel/rust/patches/0001-Allow-to-build-against-libressl-3.2.x-and-3.3.x.patch
@@ -12,15 +12,11 @@ diff --git a/vendor/openssl-sys/build/main.rs
b/vendor/openssl-sys/build/main.rs
index 49f26d2b7f37..6bacc16237ab 100644
--- a/vendor/openssl-sys/build/main.rs
+++ b/vendor/openssl-sys/build/main.rs
-@@ -221,6 +221,8 @@ See rust-openssl README for more information:
- (3, 1, 0) => ('3', '1', '0'),
- (3, 1, _) => ('3', '1', 'x'),
- (3, 2, 0) => ('3', '2', '0'),
-+ (3, 2, _) => ('3', '2', 'x'),
+@@ -232,6 +232,7 @@
+ (3, 2, _) => ('3', '2', 'x'),
+ (3, 3, 0) => ('3', '3', '0'),
+ (3, 3, 1) => ('3', '3', '1'),
+ (3, 3, _) => ('3', '3', 'x'),
_ => version_error(),
};

---
-2.30.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
deleted file mode 100644
index ca5c436..0000000
---
a/devel/rust/patches/0003-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-From 273a82b22a5ac25eebb076145caa9b953a3c7671 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel AT sholland.org>
-Date: Wed, 6 Jan 2021 23:01:33 +0100
-Subject: [PATCH 03/10] Remove -nostdlib and musl_root from musl targets
-
-[ismael AT sourcemage.org: Updated for rust 1.49.0]
-
-Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
----
- compiler/rustc_target/src/spec/crt_objects.rs | 15 ----------
- .../rustc_target/src/spec/linux_musl_base.rs | 3 --
- config.toml.example | 9 ------
- src/bootstrap/cc_detect.rs | 25 ++--------------
- src/bootstrap/compile.rs | 30 +------------------
- src/bootstrap/config.rs | 10 -------
- src/bootstrap/configure.py | 28 -----------------
- src/bootstrap/lib.rs | 19 ------------
- src/bootstrap/sanity.rs | 22 --------------
- 9 files changed, 3 insertions(+), 158 deletions(-)
-
-diff --git a/compiler/rustc_target/src/spec/crt_objects.rs
b/compiler/rustc_target/src/spec/crt_objects.rs
-index 76c0bf419e8c..5ea8a69265ff 100644
---- a/compiler/rustc_target/src/spec/crt_objects.rs
-+++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -61,21 +61,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
- ])
- }
-
--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"]),
-diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs
b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 5038a967d0a0..bc432445bea7 100644
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
-@@ -5,9 +5,6 @@ pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
- base.env = "musl".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;
-diff --git a/config.toml.example b/config.toml.example
-index c9e183887504..1c217d18f840 100644
---- a/config.toml.example
-+++ b/config.toml.example
-@@ -601,15 +601,6 @@ changelog-seen = 2
- # 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 e750c2963ddd..f6ba3032b0d5 100644
---- a/src/bootstrap/cc_detect.rs
-+++ b/src/bootstrap/cc_detect.rs
-@@ -98,7 +98,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();
-@@ -126,7 +126,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).
-@@ -157,7 +157,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
-@@ -200,26 +199,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 cdad1cb4d499..26552ece3e91 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -166,26 +166,7 @@ fn copy_self_contained_objects(
- 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,
-@@ -260,15 +241,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 c0753d88504a..55ff57dca8d4 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -156,8 +156,6 @@ pub struct Config {
- 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>,
-@@ -282,8 +280,6 @@ pub struct Target {
- pub sanitizers: bool,
- pub profiler: 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,
-@@ -469,7 +465,6 @@ struct Rust {
- 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>,
-@@ -508,8 +503,6 @@ struct TomlTarget {
- sanitizers: Option<bool>,
- profiler: Option<bool>,
- crt_static: Option<bool>,
-- musl_root: Option<String>,
-- musl_libdir: Option<String>,
- wasi_root: Option<String>,
- qemu_rootfs: Option<String>,
- no_std: Option<bool>,
-@@ -850,7 +843,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);
-@@ -890,8 +882,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.unwrap_or(build.sanitizers.unwrap_or_default());
-diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 322e9d692329..47c7432f38c2 100755
---- a/src/bootstrap/configure.py
-+++ b/src/bootstrap/configure.py
-@@ -109,34 +109,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 210084cf5ea6..56c188a75c52 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -922,25 +922,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 4cfcf6ca407b..c51168779579 100644
---- a/src/bootstrap/sanity.rs
-+++ b/src/bootstrap/sanity.rs
-@@ -171,28 +171,6 @@ pub fn check(build: &mut Build) {
- }
- }
-
-- // 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
---
-2.30.0
-
diff --git
a/devel/rust/patches/0004-Prefer-libgcc_eh-over-libunwind-on-musl.patch
b/devel/rust/patches/0004-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 1eb967f..0000000
--- a/devel/rust/patches/0004-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From abe43a02c59cc9bd9b296b24de7b30b01aa1f856 Mon Sep 17 00:00:00 2001
-From: q66 <daniel AT octaforge.org>
-Date: Sun, 3 May 2020 17:55:50 +0200
-Subject: [PATCH 04/10] Prefer libgcc_eh over libunwind on musl
-
-Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
----
- library/unwind/build.rs | 13 ++-----------
- library/unwind/src/lib.rs | 2 +-
- 2 files changed, 3 insertions(+), 12 deletions(-)
-
-diff --git a/library/unwind/build.rs b/library/unwind/build.rs
-index 24bcd40c3a8e..3196435865df 100644
---- a/library/unwind/build.rs
-+++ b/library/unwind/build.rs
-@@ -5,7 +5,7 @@ fn main() {
- 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();
-@@ -14,7 +14,7 @@ fn main() {
- } else if target.contains("linux") {
- // linking for Linux is handled in lib.rs
- if target.contains("musl") {
-- llvm_libunwind::compile();
-+ println!("cargo:rustc-link-lib=gcc_s");
- }
- } else if target.contains("freebsd") {
- println!("cargo:rustc-link-lib=gcc_s");
-@@ -143,15 +143,6 @@ mod llvm_libunwind {
- 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/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
-index dbdefa471a9e..cb83404cbd8b 100644
---- a/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -38,7 +38,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.30.0
-
diff --git a/devel/rust/patches/0006-Link-with-ssp_nonshared.patch
b/devel/rust/patches/0006-Link-with-ssp_nonshared.patch
deleted file mode 100644
index c626a0d..0000000
--- a/devel/rust/patches/0006-Link-with-ssp_nonshared.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 7002d81e5e161c4d43301ebfb1d535a7a5685587 Mon Sep 17 00:00:00 2001
-From: Ismael Luceno <ismael AT iodev.co.uk>
-Date: Thu, 7 Jan 2021 00:35:32 +0100
-Subject: [PATCH 06/10] Link with ssp_nonshared
-
-Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
----
- library/std/build.rs | 2 ++
- library/unwind/build.rs | 3 +++
- vendor/libc/src/unix/mod.rs | 6 +++---
- 3 files changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/library/std/build.rs b/library/std/build.rs
-index f2ed7552afb2..11e3ca242a81 100644
---- a/library/std/build.rs
-+++ b/library/std/build.rs
-@@ -8,6 +8,8 @@ fn main() {
- 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");
-diff --git a/library/unwind/build.rs b/library/unwind/build.rs
-index 3196435865df..ba47a77bee15 100644
---- a/library/unwind/build.rs
-+++ b/library/unwind/build.rs
-@@ -15,6 +15,9 @@ fn main() {
- // linking for Linux is handled in lib.rs
- if target.contains("musl") {
- 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");
-diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 21439c8a49fc..69b048a2e640 100644
---- a/vendor/libc/src/unix/mod.rs
-+++ b/vendor/libc/src/unix/mod.rs
-@@ -325,11 +325,11 @@ cfg_if! {
- #[link(name = "c", cfg(not(target_feature = "crt-static")))]
- extern {}
- } 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")]
---
-2.30.0
-
diff --git
a/devel/rust/patches/0009-Dynamically-link-libc-on-musl-by-default.patch
b/devel/rust/patches/0009-Dynamically-link-libc-on-musl-by-default.patch
deleted file mode 100644
index 1e84af7..0000000
--- a/devel/rust/patches/0009-Dynamically-link-libc-on-musl-by-default.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 62f108fec44b12e66d2bd7f9aa980f49f9936f8f Mon Sep 17 00:00:00 2001
-From: q66 <daniel AT octaforge.org>
-Date: Sat, 21 Dec 2019 17:04:13 +0100
-Subject: [PATCH 09/10] Dynamically link libc on musl by default
-
-Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
----
- compiler/rustc_target/src/spec/linux_musl_base.rs | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs
b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index bc432445bea7..e2b00dd28062 100644
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
-@@ -1,4 +1,3 @@
--use crate::spec::crt_objects::{self, CrtObjectsFallback};
- use crate::spec::TargetOptions;
-
- pub fn opts() -> TargetOptions {
-@@ -6,8 +5,7 @@ pub fn opts() -> TargetOptions {
-
- base.env = "musl".to_string();
-
-- // These targets statically link libc by default
-- base.crt_static_default = true;
-+ base.crt_static_default = false;
-
- base
- }
---
-2.30.0
-



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (b05ffb2c70c84b5893f105667f33e495b39202b0), Pavel Vinogradov, 07/29/2021

Archive powered by MHonArc 2.6.24.

Top of Page