aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/tamago.go
blob: 538dc65e6badd23f8a6cf6bf495fd3cff4cf67a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package rosa

import (
	"runtime"

	"hakurei.app/internal/pkg"
)

func (t Toolchain) newTamaGo() (pkg.Artifact, string) {
	const (
		version  = "1.26.2"
		checksum = "5xlhWq2NGhYCjt0y73QkydJ386lxg6-HkiO84ne6ByQSJBDat7-HSVzNA6jy7Laz"
	)
	return t.New("tamago-go"+version, 0, t.AppendPresets(nil,
		Bash,
		Go,
	), nil, []string{
		"CC=cc",
		"GOCACHE=/tmp/gocache",
		"CGO_ENABLED=0",
	}, `
mkdir /work/system # "${TMPDIR}"
cp -r /usr/src/tamago /work/system
cd /work/system/tamago/src
chmod -R +w ..

sed -i \
	's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \
	cmd/link/internal/`+runtime.GOARCH+`/obj.go
sed -i \
	's/cpu.X86.HasAVX512VBMI/& \&\& cpu.X86.HasPOPCNT/' \
	internal/runtime/gc/scan/scan_amd64.go

rm \
	os/root_unix_test.go \
	cmd/cgo/internal/testsanitizers/tsan_test.go \
	cmd/cgo/internal/testsanitizers/cshared_test.go

./all.bash
`, pkg.Path(AbsUsrSrc.Append("tamago"), false, newFromGitHub(
		"usbarmory/tamago-go",
		"tamago-go"+version,
		checksum,
	))), version
}
func init() {
	artifactsM[TamaGo] = Metadata{
		f: Toolchain.newTamaGo,

		Name:        "tamago",
		Description: "a Go toolchain extended with support for bare metal execution",
		Website:     "https://github.com/usbarmory/tamago-go",

		ID: 388872,
	}
}