mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 12:15:32 +03:00
* Update alpine-target.patch to fix the triplet on armhf and add the armv7 and ppc64le
triplets. This should have been done in 69851bdae1
,
but has been forgotten.
* Remove the following patches:
* llvm-with-ffi.patch -> only required when statically linking LLVM
* bootstrap-tool-respect-tool-config.patch -> plain outdated, not required anymore
29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
From: Shiz <hi@shiz.me>
|
|
Date: Fri, 21 Apr 2017 01:04:46 +0200
|
|
Last-Updated: Sat, 19 May 2018 23:54:30 +0200
|
|
Subject: [PATCH] Support fully static linking on *nix targets
|
|
|
|
It adds the proper linker argument for static result objects to `Linker`
|
|
and implements them for `GnuLinker` and `MsvcLinker`.
|
|
|
|
Finally, if no linking preference is given for native libraries
|
|
(`NativeLibraryKind::NativeUnknown`), they are linked statically if full
|
|
static linking is requested, instead of dynamically as before.
|
|
|
|
--- a/src/librustc_codegen_ssa/back/link.rs
|
|
+++ b/src/librustc_codegen_ssa/back/link.rs
|
|
@@ -1218,13 +1218,13 @@ fn add_local_native_libraries(cmd: &mut dyn Linker,
|
|
let search_path = archive_search_paths(sess);
|
|
for lib in relevant_libs {
|
|
let name = match lib.name {
|
|
Some(ref l) => l,
|
|
None => continue,
|
|
};
|
|
match lib.kind {
|
|
- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
|
|
+ NativeLibraryKind::NativeUnknown => if sess.crt_static() { cmd.link_staticlib(&name.as_str()) } else { cmd.link_dylib(&name.as_str()) },
|
|
NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
|
|
NativeLibraryKind::NativeStaticNobundle => cmd.link_staticlib(&name.as_str()),
|
|
NativeLibraryKind::NativeStatic => cmd.link_whole_staticlib(&name.as_str(),
|
|
&search_path)
|
|
}
|