diff options
author | Shiz <hi@shiz.me> | 2017-04-16 15:56:18 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-21 01:44:33 +0200 |
commit | 3db351aa5647eb4a482e9e008bedcf1a5be51302 (patch) | |
tree | fe64ea58b55936fc2da3f78eaa48c1703ec6bcf6 /testing/rust/fix-linux_musl_base.patch | |
parent | e4cc4b79b548e043d635ff35c3e9f2e832be1202 (diff) | |
download | aports-3db351aa5647eb4a482e9e008bedcf1a5be51302.tar.bz2 aports-3db351aa5647eb4a482e9e008bedcf1a5be51302.tar.xz |
testing/rust: reorganize patches
This divides up the patches in three logical categories:
- musl-*.patch: musl support patches intended for upstreaming;
- alpine-*.patch: Alpine-specific patches that are likely not upstreamable;
- *.patch: functionality patch that may make it upstream.
Diffstat (limited to 'testing/rust/fix-linux_musl_base.patch')
-rw-r--r-- | testing/rust/fix-linux_musl_base.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/testing/rust/fix-linux_musl_base.patch b/testing/rust/fix-linux_musl_base.patch deleted file mode 100644 index 38194290cb..0000000000 --- a/testing/rust/fix-linux_musl_base.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Jakub Jirutka <jakub@jirutka.cz> -Date: Sat, 08 Aug 2016 15:06:00 +0200 -Subject: [PATCH] Fix linux_musl_base for native musl host - -See https://github.com/rust-lang/rust/pull/40113 - ---- a/src/librustc_back/target/linux_musl_base.rs -+++ b/src/librustc_back/target/linux_musl_base.rs -@@ -13,54 +13,14 @@ - pub fn opts() -> TargetOptions { - let mut base = super::linux_base::opts(); - -- // Make sure that the linker/gcc really don't pull in anything, including -- // default objects, libs, etc. -- base.pre_link_args.push("-nostdlib".to_string()); -- - // At least when this was tested, the linker would not add the - // `GNU_EH_FRAME` program header to executables generated, which is required - // when unwinding to locate the unwinding information. I'm not sure why this - // argument is *not* necessary for normal builds, but it can't hurt! - base.pre_link_args.push("-Wl,--eh-frame-hdr".to_string()); - -- // There's a whole bunch of circular dependencies when dealing with MUSL -- // unfortunately. To put this in perspective libc is statically linked to -- // liblibc and libunwind is statically linked to libstd: -- // -- // * libcore depends on `fmod` which is in libc (transitively in liblibc). -- // liblibc, however, depends on libcore. -- // * compiler-rt has personality symbols that depend on libunwind, but -- // libunwind is in libstd which depends on compiler-rt. -- // -- // Recall that linkers discard libraries and object files as much as -- // possible, and with all the static linking and archives flying around with -- // MUSL the linker is super aggressively stripping out objects. For example -- // the first case has fmod stripped from liblibc (it's in its own object -- // file) so it's not there when libcore needs it. In the second example all -- // the unused symbols from libunwind are stripped (each is in its own object -- // file in libstd) before we end up linking compiler-rt which depends on -- // those symbols. -- // -- // To deal with these circular dependencies we just force the compiler to -- // link everything as a group, not stripping anything out until everything -- // is processed. The linker will still perform a pass to strip out object -- // files but it won't do so until all objects/archives have been processed. -- base.pre_link_args.push("-Wl,-(".to_string()); -- base.post_link_args.push("-Wl,-)".to_string()); -- -- // When generating a statically linked executable there's generally some -- // small setup needed which is listed in these files. These are provided by -- // a musl toolchain and are linked by default by the `musl-gcc` script. Note -- // that `gcc` also does this by default, it just uses some different files. -- // -- // Each target directory for musl has these object files included in it so -- // they'll be included from there. -- base.pre_link_objects_exe.push("crt1.o".to_string()); -- base.pre_link_objects_exe.push("crti.o".to_string()); -- base.post_link_objects.push("crtn.o".to_string()); -- - // Except for on MIPS, these targets statically link libc by default. - base.crt_static_default = true; - - base - } |