File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,16 @@ cfg_if! {
285
285
// cargo build, don't pull in anything extra as the libstd dep
286
286
// already pulls in all libs.
287
287
} else if #[ cfg( target_env = "musl" ) ] {
288
+ // On some architectures (e.g. aarch64) musl depends on some libgcc
289
+ // functions (__addtf3, __multf3, __subtf3) for long double arithmetic that
290
+ // it uses internally. Unfortunately we don't provide these functions in
291
+ // compiler-builtins, so we instead need to get them from libgcc.
292
+ //
293
+ // This is not a problem if we are linking to libc dynamically since the
294
+ // libgcc dependency will automatically get picked up by the linker then.
295
+ #[ cfg_attr( feature = "stdbuild" ,
296
+ link( name = "gcc" , kind = "static" ,
297
+ cfg( target_feature = "crt-static" ) ) ) ]
288
298
#[ cfg_attr( feature = "stdbuild" ,
289
299
link( name = "c" , kind = "static" ,
290
300
cfg( target_feature = "crt-static" ) ) ) ]
You can’t perform that action at this time.
0 commit comments