We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b9d3ff commit a0abecfCopy full SHA for a0abecf
src/cmd/link/internal/ld/lib.go
@@ -1137,6 +1137,16 @@ func hostlink() {
1137
//
1138
// In both cases, switch to gold.
1139
argv = append(argv, "-fuse-ld=gold")
1140
+
1141
+ // If gold is not installed, gcc will silently switch
1142
+ // back to ld.bfd. So we parse the version information
1143
+ // and provide a useful error if gold is missing.
1144
+ cmd := exec.Command(extld, "-fuse-ld=gold", "-Wl,--version")
1145
+ if out, err := cmd.CombinedOutput(); err != nil {
1146
+ if !bytes.Contains(out, []byte("GNU gold")) {
1147
+ log.Fatalf("ARM external linker must be gold (issue #15696), but is not: %s", out)
1148
+ }
1149
1150
}
1151
1152
0 commit comments