Several fixes to the redox target specs

* Allow crt-static for dylibs
* Pass -lgcc to the linker
This commit is contained in:
Jeremy Soller 2024-06-09 12:35:27 +00:00 committed by bjorn3
parent 92af831290
commit 60a972db83

View File

@ -1,4 +1,4 @@
use crate::spec::{cvs, RelroLevel, TargetOptions};
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, RelroLevel, TargetOptions};
pub fn opts() -> TargetOptions {
TargetOptions {
@ -12,6 +12,8 @@ pub fn opts() -> TargetOptions {
has_thread_local: true,
crt_static_default: true,
crt_static_respected: true,
crt_static_allows_dylibs: true,
late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-lgcc"]),
..Default::default()
}
}