Commit d826b2ed authored by Jan Ziak's avatar Jan Ziak

cmd/dist: use GOHOSTARCH/GOHOSTOS instead of GOOS/GOARCH for host libraries and binaries

Fixes #6559

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/81330045
parent e45141b8
...@@ -545,17 +545,17 @@ static struct { ...@@ -545,17 +545,17 @@ static struct {
{"cmd/5c", { {"cmd/5c", {
"../cc/pgen.c", "../cc/pgen.c",
"../cc/pswt.c", "../cc/pswt.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libcc.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libcc.a",
}}, }},
{"cmd/6c", { {"cmd/6c", {
"../cc/pgen.c", "../cc/pgen.c",
"../cc/pswt.c", "../cc/pswt.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libcc.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libcc.a",
}}, }},
{"cmd/8c", { {"cmd/8c", {
"../cc/pgen.c", "../cc/pgen.c",
"../cc/pswt.c", "../cc/pswt.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libcc.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libcc.a",
}}, }},
{"cmd/5g", { {"cmd/5g", {
"../gc/cplx.c", "../gc/cplx.c",
...@@ -563,7 +563,7 @@ static struct { ...@@ -563,7 +563,7 @@ static struct {
"../gc/plive.c", "../gc/plive.c",
"../gc/popt.c", "../gc/popt.c",
"../gc/popt.h", "../gc/popt.h",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libgc.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libgc.a",
}}, }},
{"cmd/6g", { {"cmd/6g", {
"../gc/cplx.c", "../gc/cplx.c",
...@@ -571,7 +571,7 @@ static struct { ...@@ -571,7 +571,7 @@ static struct {
"../gc/plive.c", "../gc/plive.c",
"../gc/popt.c", "../gc/popt.c",
"../gc/popt.h", "../gc/popt.h",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libgc.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libgc.a",
}}, }},
{"cmd/8g", { {"cmd/8g", {
"../gc/cplx.c", "../gc/cplx.c",
...@@ -579,7 +579,7 @@ static struct { ...@@ -579,7 +579,7 @@ static struct {
"../gc/plive.c", "../gc/plive.c",
"../gc/popt.c", "../gc/popt.c",
"../gc/popt.h", "../gc/popt.h",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libgc.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libgc.a",
}}, }},
{"cmd/5l", { {"cmd/5l", {
"../ld/*", "../ld/*",
...@@ -594,9 +594,9 @@ static struct { ...@@ -594,9 +594,9 @@ static struct {
"zdefaultcc.go", "zdefaultcc.go",
}}, }},
{"cmd/", { {"cmd/", {
"$GOROOT/pkg/obj/$GOOS_$GOARCH/liblink.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/liblink.a",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libbio.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libbio.a",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/lib9.a", "$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/lib9.a",
}}, }},
{"pkg/runtime", { {"pkg/runtime", {
"zaexperiment.h", // must sort above zasm "zaexperiment.h", // must sort above zasm
...@@ -804,6 +804,8 @@ install(char *dir) ...@@ -804,6 +804,8 @@ install(char *dir)
bsubst(&b1, "$GOROOT", goroot); bsubst(&b1, "$GOROOT", goroot);
bsubst(&b1, "$GOOS", goos); bsubst(&b1, "$GOOS", goos);
bsubst(&b1, "$GOARCH", goarch); bsubst(&b1, "$GOARCH", goarch);
bsubst(&b1, "$GOHOSTOS", gohostos);
bsubst(&b1, "$GOHOSTARCH", gohostarch);
p = bstr(&b1); p = bstr(&b1);
if(hassuffix(p, ".a")) { if(hassuffix(p, ".a")) {
vadd(&lib, bpathf(&b, "%s", p)); vadd(&lib, bpathf(&b, "%s", p));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment