aboutsummaryrefslogtreecommitdiffstats
path: root/community/rust/musl-fix-linux_musl_base.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/rust/musl-fix-linux_musl_base.patch')
-rw-r--r--community/rust/musl-fix-linux_musl_base.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/community/rust/musl-fix-linux_musl_base.patch b/community/rust/musl-fix-linux_musl_base.patch
index 38194290cb..f2efb065e0 100644
--- a/community/rust/musl-fix-linux_musl_base.patch
+++ b/community/rust/musl-fix-linux_musl_base.patch
@@ -12,13 +12,13 @@ See https://github.com/rust-lang/rust/pull/40113
- // 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());
+- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().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());
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().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
@@ -42,8 +42,8 @@ See https://github.com/rust-lang/rust/pull/40113
- // 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());
+- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,-(".to_string());
+- base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-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