diff --git a/internal/rosa/go.go b/internal/rosa/go.go index 31417ee..74e5d29 100644 --- a/internal/rosa/go.go +++ b/internal/rosa/go.go @@ -63,18 +63,50 @@ ln -s \ } func (t Toolchain) newGoLatest() pkg.Artifact { + var ( + bootstrapEnv []string + bootstrapExtra []pkg.Artifact + ) + switch runtime.GOARCH { + case "amd64": + bootstrapExtra = append(bootstrapExtra, t.newGoBootstrap()) + + case "arm64": + bootstrapEnv = append(bootstrapEnv, + "GOROOT_BOOTSTRAP=/system", + ) + bootstrapExtra = append(bootstrapExtra, + t.Load(Binutils), + + t.Load(GMP), + t.Load(MPFR), + t.Load(MPC), + + t.Load(Zlib), + t.Load(Libucontext), + + t.Load(gcc), + ) + + default: + panic("unsupported target " + runtime.GOARCH) + } + go119 := t.newGo( "1.19", "9_e0aFHsIkVxWVGsp9T2RvvjOc3p4n9o9S8tkNe9Cvgzk_zI2FhRQB7ioQkeAAro", - []string{"CGO_ENABLED=0"}, ` + append(bootstrapEnv, "CGO_ENABLED=0"), ` rm \ crypto/tls/handshake_client_test.go \ + cmd/pprof/pprof_test.go \ os/os_unix_test.go +sed -i \ + 's/os\.Getenv("GCCGO")$/"nonexistent"/' \ + go/internal/gccgoimporter/importer_test.go echo \ 'type syscallDescriptor = int' >> \ os/rawconn_test.go -`, t.newGoBootstrap(), - ) +`, bootstrapExtra...) go121 := t.newGo( "1.21.13",