File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,15 @@ pub fn opts() -> TargetOptions {
60
60
base. pre_link_objects_exe_crt . push ( "crti.o" . to_string ( ) ) ;
61
61
base. post_link_objects_crt . push ( "crtn.o" . to_string ( ) ) ;
62
62
63
+ // On some architectures (e.g. aarch64) musl depends on some libgcc
64
+ // functions (__addtf3, __multf3, __subtf3) for long double arithmetic that
65
+ // it uses internally. Unfortunately we don't provide these functions in
66
+ // compiler-builtins, so we instead need to get them from libgcc.
67
+ //
68
+ // This is not a problem if we are linking to libc dynamically since the
69
+ // libgcc dependency will automatically get picked up by the linker then.
70
+ base. post_link_objects_crt . push ( "-lgcc" . to_string ( ) ) ;
71
+
63
72
// These targets statically link libc by default
64
73
base. crt_static_default = true ;
65
74
// These targets allow the user to choose between static and dynamic linking.
You can’t perform that action at this time.
0 commit comments