diff --git a/unix/mksyscall.go b/unix/mksyscall.go index f6678425..a8d73bb9 100644 --- a/unix/mksyscall.go +++ b/unix/mksyscall.go @@ -86,16 +86,14 @@ func parseParam(p string) Param { } func main() { - // Get the OS and architecture (using GOARCH_TARGET if it exists) - goos := os.Getenv("GOOS") + goos := os.Getenv("GOOS_TARGET") + if goos == "" { + goos = os.Getenv("GOOS") + } if goos == "" { fmt.Fprintln(os.Stderr, "GOOS not defined in environment") os.Exit(1) } - goarch := os.Getenv("GOARCH_TARGET") - if goarch == "" { - goarch = os.Getenv("GOARCH") - } // Check that we are using the Docker-based build system if we should if goos == "linux" {