File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,18 @@ 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
290
+ // that it uses internally. Unfortunately we don't provide these
291
+ // functions in compiler-builtins, so we instead need to get them from
292
+ // libgcc.
293
+ //
294
+ // This is not a problem if we are linking to libc dynamically since the
295
+ // libgcc dependency will automatically get picked up by the linker
296
+ // then.
297
+ #[ cfg_attr( feature = "stdbuild" ,
298
+ link( name = "gcc" , kind = "static" ,
299
+ cfg( target_feature = "crt-static" ) ) ) ]
288
300
#[ cfg_attr( feature = "stdbuild" ,
289
301
link( name = "c" , kind = "static" ,
290
302
cfg( target_feature = "crt-static" ) ) ) ]
You can’t perform that action at this time.
0 commit comments