Rollup merge of #105418 - BelovDV:fix-libc-hack, r=petrochenkov

fix: remove hack from link.rs

This logic implemented in libc.

r? `@petrochenkov`
This commit is contained in:
Matthias Krüger 2022-12-07 15:39:09 +01:00 committed by GitHub
commit 4968af0ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2352,15 +2352,6 @@ fn add_native_libs_from_crate(
&search_paths.get_or_init(|| archive_search_paths(sess)),
);
} else {
// HACK/FIXME: Fixup a circular dependency between libgcc and libc
// with glibc. This logic should be moved to the libc crate.
if cnum != LOCAL_CRATE
&& sess.target.os == "linux"
&& sess.target.env == "gnu"
&& name == "c"
{
cmd.link_staticlib("gcc", false);
}
cmd.link_staticlib(name, verbatim)
}
}