Skip to content

Commit c4a76c4

Browse files
committed
Explicitly check that we are looking at GNU ld, and otherwise skip the check.
(The first version of the PR had this implicitly by always searching for the string literal "GNU ld version " when looking for where to start the search for the version number.)
1 parent 357542f commit c4a76c4

File tree

1 file changed

+6
-0
lines changed
  • src/librustc_codegen_ssa/back

1 file changed

+6
-0
lines changed

src/librustc_codegen_ssa/back/link.rs

+6
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,12 @@ fn check_for_buggy_ld_version(sess: &Session,
541541
};
542542
debug!("check_for_buggy_ld_version first_line: {:?}", first_line);
543543

544+
if !first_line.contains("GNU ld") {
545+
// If we cannot find "GNU ld" in the version string, then assume that
546+
// this is not actually GNU ld; no need for warning.
547+
return;
548+
}
549+
544550
let version_suffix_start = match first_line.find(" 2.") {
545551
None => {
546552
// if we cannot find ` 2.`, then assume that this an ld version that

0 commit comments

Comments
 (0)