aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/tamago.az
blob: d784c85a16bae8d10daf5e327334cb27364ae4c9 (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
package tamago {
	description = "a Go toolchain extended with support for bare metal execution";
	website = "https://github.com/usbarmory/tamago-go";
	anitya = 388872;

	version# = "1.27.1";
	source = remoteGitHub {
		suffix = "usbarmory/tamago-go";
		tag = "tamago-go"+version;
		checksum = "TaWPzqqBMuhGslUm9CQvShJRjfONbFEr51mcM5zFlopYhYA6Tb58g8wRPc5a5lQ0";
	};

	env = [
		"CC=cc",
		"GOCACHE=/tmp/gocache",
		"CGO_ENABLED=0",
	];

	enterSource = true;

	exec = generic {
		chdir = false;
		build = `
mkdir /work/system/
cp -r . /work/system/tamago
cd /work/system/tamago/src
chmod -R +w ..

sed -i \
	's,/lib/ld-musl-` + linuxArch + `.so.1,/system/bin/linker,' \
	cmd/link/internal/` + arch + `/obj.go

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

set +u
. ./make.bash "$@" --no-banner
set -u
`;
		check = "bash run.bash --no-rebuild\n";
		install = "../bin/go tool dist banner # print build info";
	};

	tools = [ bash, go ];
}