New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/dist: use gohostarch for ssa rewrite check #52362
Conversation
This PR (HEAD: d8ecc86) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/400376 to see it. Tip: You can toggle comments from me using the |
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Fixes #52583 |
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - go: does not support riscv-32bit
This PR (HEAD: 5069feb) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/400376 to see it. Tip: You can toggle comments from me using the |
Message from Christian Stewart: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - patch: add a signed-off-by and upstream link - go: does not support riscv-32bit - go: check for required riscv ISA extensions Signed-off-by: Christian Stewart <christian@paral.in>
The GOOS and GOARCH environment variables should be unset before calling mkbuildcfg. This change fixes a build failure when GOARCH=riscv64. Building Go toolchain1 using go-1.4-bootstrap-20171003. src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814 invalid operation: y << x (shift count type int64, must be unsigned integer) There is a build issue with go1.4 with the riscv64 code: however, why is the riscv64 code being compiled at all? GOARCH is set when calling mkbuildcfg, so go1.4 is trying to compile riscv64. [Buildroot]: submitted to upstream: - golang#52583 - https://go-review.googlesource.com/c/go/+/400376 - GitHub-Pull-Request: golang#52362 Signed-off-by: Christian Stewart <christian@paral.in>
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - patch: add a signed-off-by and upstream link - go: does not support riscv-32bit - go: check for required riscv ISA extensions Signed-off-by: Christian Stewart <christian@paral.in>
Message from Ian Lance Taylor: Patch Set 2: (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
This PR (HEAD: 5fb713f) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/400376 to see it. Tip: You can toggle comments from me using the |
The GOOS and GOARCH environment variables should be unset before calling mkbuildcfg, as the target GOOS and GOARCH is not relevant while compiling the bootstrap Go compiler using the C-based go-bootstrap go1.4 compiler. This change fixes a build failure when GOARCH=riscv64: Building Go toolchain1 using go-1.4-bootstrap-20171003. src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814 invalid operation: y << x (shift count type int64, must be unsigned integer) This is because: - buildtool.go:198: calls bootstrapRewriteFile(src) - bootstrapRewriteFile: buildtool.go:283 calls: - isUnneededSSARewriteFile: checks os.Getenv("GOARCH") - isUnneededSSARewriteFile: returns "", false - bootstrapRewriteFile: calls bootstrapFixImports - boostrapFixImports: generates code go1.4 cannot compile By unsetting GOARCH here we are causing isUnneededSSARewriteFile to return true instead of false which generates stub functions bypassing the incompatible code. buildtool.go:272 in isUnneededSSARewriteFile is the only place the GOARCH environment variable is checked apart from the xinit function. This patch simply moves the os.Setenv("GOARCH", "") to before the block of code where bootstrapRewriteFile is called. [Buildroot]: submitted to upstream: - golang#52583 - https://go-review.googlesource.com/c/go/+/400376 - GitHub-Pull-Request: golang#52362 Signed-off-by: Christian Stewart <christian@paral.in>
The GOOS and GOARCH environment variables should be unset before calling mkbuildcfg, as the target GOOS and GOARCH is not relevant while compiling the bootstrap Go compiler using the C-based go-bootstrap go1.4 compiler. This change fixes a build failure when GOARCH=riscv64: Building Go toolchain1 using go-1.4-bootstrap-20171003. src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814 invalid operation: y << x (shift count type int64, must be unsigned integer) This is because: - buildtool.go:198: calls bootstrapRewriteFile(src) - bootstrapRewriteFile: buildtool.go:283 calls: - isUnneededSSARewriteFile: checks os.Getenv("GOARCH") - isUnneededSSARewriteFile: returns "", false - bootstrapRewriteFile: calls bootstrapFixImports - boostrapFixImports: generates code go1.4 cannot compile By unsetting GOARCH here we are causing isUnneededSSARewriteFile to return true instead of false which generates stub functions bypassing the incompatible code. buildtool.go:272 in isUnneededSSARewriteFile is the only place the GOARCH environment variable is checked apart from the xinit function. This patch simply moves the os.Setenv("GOARCH", "") to before the block of code where bootstrapRewriteFile is called. [Buildroot]: submitted to upstream: - golang#52583 - https://go-review.googlesource.com/c/go/+/400376 - GitHub-Pull-Request: golang#52362 Signed-off-by: Christian Stewart <christian@paral.in>
The GOOS and GOARCH environment variables should be unset before calling mkbuildcfg, as the target GOOS and GOARCH is not relevant while compiling the bootstrap Go compiler using the C-based go-bootstrap go1.4 compiler. This change fixes a build failure when GOARCH=riscv64: Building Go toolchain1 using go-1.4-bootstrap-20171003. src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814 invalid operation: y << x (shift count type int64, must be unsigned integer) This is because: - buildtool.go:198: calls bootstrapRewriteFile(src) - bootstrapRewriteFile: buildtool.go:283 calls: - isUnneededSSARewriteFile: checks os.Getenv("GOARCH") - isUnneededSSARewriteFile: returns "", false - bootstrapRewriteFile: calls bootstrapFixImports - boostrapFixImports: generates code go1.4 cannot compile By unsetting GOARCH here we are causing isUnneededSSARewriteFile to return true instead of false which generates stub functions bypassing the incompatible code. buildtool.go:272 in isUnneededSSARewriteFile is the only place the GOARCH environment variable is checked apart from the xinit function. This patch simply moves the os.Setenv("GOARCH", "") to before the block of code where bootstrapRewriteFile is called. [Buildroot]: submitted to upstream: - golang#52583 - https://go-review.googlesource.com/c/go/+/400376 - GitHub-Pull-Request: golang#52362 Signed-off-by: Christian Stewart <christian@paral.in>
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - patch: add a signed-off-by and upstream link - go: does not support riscv-32bit - go: check for required riscv ISA extensions v3 -> v4: - patch: simplify & add comments describing fixes Signed-off-by: Christian Stewart <christian@paral.in>
Message from Christian Stewart: Patch Set 3: (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - fixed build error with go-bootstrap v2 -> v3: - patch: add a signed-off-by and upstream link - go: does not support riscv-32bit - go: check for required riscv ISA extensions v3 -> v4: - patch: simplify & add comments describing fixes Signed-off-by: Christian Stewart <christian@paral.in>
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Add a patch to fix a build failure due to the target GOARCH being used while bootstrapping the Go compiler with the go-bootstrap compiler. Uses the host architecture variable instead. This commit updates the patch with improvements from the upstream PR. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - simplify patch according to upstream comments - update commit message in patch
Message from Joel Sing: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Joel Sing: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Bryan Mills: Patch Set 4: Run-TryBot+1 Code-Review+2 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Gopher Robot: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Gopher Robot: Patch Set 4: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Bryan Mills: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Bryan Mills: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Edited PR title & body to match commit message. |
Message from Christian Stewart: Patch Set 4: (8 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Christian Stewart: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Christian Stewart: Patch Set 5: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Bryan Mills: Patch Set 5: Run-TryBot+1 Auto-Submit+1 Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Gopher Robot: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Gopher Robot: Patch Set 5: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Christian Stewart: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Joel Sing: Patch Set 5: Run-TryBot+1 Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Gopher Robot: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Gopher Robot: Patch Set 5: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Message from Bryan Mills: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/400376. |
Fix a build failure when bootstrapping the Go compiler with go-bootstrap 1.4 while the environment contains GOARCH=riscv64. Building Go toolchain1 using go-1.4-bootstrap-20171003. src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814 invalid operation: y << x (shift count type int64, must be unsigned integer) This is because: - buildtool.go:198: calls bootstrapRewriteFile(src) - bootstrapRewriteFile: buildtool.go:283 calls: - isUnneededSSARewriteFile: checks os.Getenv("GOARCH") - isUnneededSSARewriteFile: returns "", false - bootstrapRewriteFile: calls bootstrapFixImports - boostrapFixImports: generates code go1.4 cannot compile Instead of checking "GOARCH" in the environment, use the gohostarch variable. Change-Id: Ie9c190498555c4068461fead6278a62e924062c6 GitHub-Last-Rev: 300d7a7 GitHub-Pull-Request: #52362 Reviewed-on: https://go-review.googlesource.com/c/go/+/400376 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Joel Sing <joel@sing.id.au> Run-TryBot: Joel Sing <joel@sing.id.au>
This PR is being closed because golang.org/cl/400376 has been merged. |
Add a patch to fix a build failure due to the target GOARCH being used while bootstrapping the Go compiler with the go-bootstrap compiler. Uses the host architecture variable instead. This commit updates the patch with improvements from the upstream PR. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> --- v1 -> v2: - simplify patch according to upstream comments - update commit message in patch v2 -> v3: - upstream has accepted & merged patch - update commit with upstream patch information
Add a patch to fix a build failure due to the target GOARCH being used while bootstrapping the Go compiler with the go-bootstrap compiler. Uses the host architecture variable instead. This commit updates the patch with improvements from the upstream PR. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit 8a1158f) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add a patch to fix a build failure due to the target GOARCH being used while bootstrapping the Go compiler with the go-bootstrap compiler. Uses the host architecture variable instead. This commit updates the patch with improvements from the upstream PR. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> (cherry picked from commit bc3de65) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Enable the supported "riscv64" GOARCH. Add a patch to fix a build failure due to GOARCH leaking into the calls to the go-bootstrap compiler. Unsets the GOARCH before calling go-bootstrap. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit 8a1158f) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add a patch to fix a build failure due to the target GOARCH being used while bootstrapping the Go compiler with the go-bootstrap compiler. Uses the host architecture variable instead. This commit updates the patch with improvements from the upstream PR. PR: golang/go#52362 Signed-off-by: Christian Stewart <christian@paral.in> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> (cherry picked from commit bc3de65) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fix a build failure when bootstrapping the Go compiler with go-bootstrap 1.4
while the environment contains GOARCH=riscv64.
Building Go toolchain1 using go-1.4-bootstrap-20171003.
src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814
invalid operation: y << x (shift count type int64, must be unsigned integer)
This is because:
Instead of checking "GOARCH" in the environment, use the gohostarch variable.