internal/rosa/go: alternative bootstrap path
For targets where the bootstrap toolchain is not available. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -66,6 +66,8 @@ func (t Toolchain) newGoLatest() pkg.Artifact {
|
|||||||
var (
|
var (
|
||||||
bootstrapEnv []string
|
bootstrapEnv []string
|
||||||
bootstrapExtra []pkg.Artifact
|
bootstrapExtra []pkg.Artifact
|
||||||
|
|
||||||
|
finalEnv []string
|
||||||
)
|
)
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "amd64":
|
case "amd64":
|
||||||
@@ -88,6 +90,8 @@ func (t Toolchain) newGoLatest() pkg.Artifact {
|
|||||||
t.Load(gcc),
|
t.Load(gcc),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
finalEnv = append(finalEnv, "CGO_ENABLED=0")
|
||||||
|
|
||||||
default:
|
default:
|
||||||
panic("unsupported target " + runtime.GOARCH)
|
panic("unsupported target " + runtime.GOARCH)
|
||||||
}
|
}
|
||||||
@@ -98,6 +102,7 @@ func (t Toolchain) newGoLatest() pkg.Artifact {
|
|||||||
append(bootstrapEnv, "CGO_ENABLED=0"), `
|
append(bootstrapEnv, "CGO_ENABLED=0"), `
|
||||||
rm \
|
rm \
|
||||||
crypto/tls/handshake_client_test.go \
|
crypto/tls/handshake_client_test.go \
|
||||||
|
cmd/pprof/pprof_test.go \
|
||||||
os/os_unix_test.go
|
os/os_unix_test.go
|
||||||
sed -i \
|
sed -i \
|
||||||
's/os\.Getenv("GCCGO")$/"nonexistent"/' \
|
's/os\.Getenv("GCCGO")$/"nonexistent"/' \
|
||||||
@@ -128,7 +133,7 @@ echo \
|
|||||||
go123 := t.newGo(
|
go123 := t.newGo(
|
||||||
"1.23.12",
|
"1.23.12",
|
||||||
"wcI32bl1tkqbgcelGtGWPI4RtlEddd-PTd76Eb-k7nXA5LbE9yTNdIL9QSOOxMOs",
|
"wcI32bl1tkqbgcelGtGWPI4RtlEddd-PTd76Eb-k7nXA5LbE9yTNdIL9QSOOxMOs",
|
||||||
nil, `
|
[]string{"CGO_ENABLED=0"}, `
|
||||||
sed -i \
|
sed -i \
|
||||||
's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \
|
's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \
|
||||||
cmd/link/internal/`+runtime.GOARCH+`/obj.go
|
cmd/link/internal/`+runtime.GOARCH+`/obj.go
|
||||||
@@ -138,7 +143,7 @@ sed -i \
|
|||||||
go125 := t.newGo(
|
go125 := t.newGo(
|
||||||
"1.25.6",
|
"1.25.6",
|
||||||
"x0z430qoDvQbbw_fftjW0rh_GSoh0VJhPzttWk_0hj9yz9AKOjuwRMupF_Q0dbt7",
|
"x0z430qoDvQbbw_fftjW0rh_GSoh0VJhPzttWk_0hj9yz9AKOjuwRMupF_Q0dbt7",
|
||||||
nil, `
|
finalEnv, `
|
||||||
sed -i \
|
sed -i \
|
||||||
's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \
|
's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \
|
||||||
cmd/link/internal/`+runtime.GOARCH+`/obj.go
|
cmd/link/internal/`+runtime.GOARCH+`/obj.go
|
||||||
|
|||||||
Reference in New Issue
Block a user