func Main() {
defer hidePanic()
- // Allow GOARCH=thearch.thestring or GOARCH=thearch.thestringsuffix,
- // but not other values.
- p := obj.Getgoarch()
-
- if !strings.HasPrefix(p, Thearch.LinkArch.Name) {
- log.Fatalf("cannot use %cg with GOARCH=%s", Thearch.LinkArch.Family, p)
- }
- goarch = p
+ goarch = obj.Getgoarch()
Ctxt = obj.Linknew(Thearch.LinkArch)
Ctxt.DiagFunc = Yyerror
if !strings.HasPrefix(line, "go object ") {
if strings.HasSuffix(pn, ".go") {
- Exitf("%cl: input %s is not .%c file (use %cg to compile .go files)", SysArch.Family, pn, SysArch.Family, SysArch.Family)
+ Exitf("%s: uncompiled .go source file", pn)
+ return nil
}
if line == SysArch.Name {
goroot = obj.Getgoroot()
goos = obj.Getgoos()
goarch = obj.Getgoarch()
-
- if !strings.HasPrefix(goarch, SysArch.Name) {
- log.Fatalf("cannot use %cc with GOARCH=%s", SysArch.Family, goarch)
- }
}
// Copied from ../gc/subr.c:/^pathtoprefix; must stay in sync.