Files
hakurei/internal/rosa/gnu.go
Ophestra 7636f39066
All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m32s
Test / Hakurei (push) Successful in 3m39s
Test / ShareFS (push) Successful in 3m44s
Test / Sandbox (race detector) (push) Successful in 5m0s
Test / Hakurei (race detector) (push) Successful in 5m56s
Test / Flake checks (push) Successful in 1m29s
internal/rosa: provide package metadata
This had to be done out-of-band because there was no way to efficiently represent these within Artifact.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-04 21:26:23 +09:00

916 lines
25 KiB
Go

package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newM4() (pkg.Artifact, string) {
const (
version = "1.4.20"
checksum = "RT0_L3m4Co86bVBY3lCFAEs040yI1WdeNmRylFpah8IZovTm6O4wI7qiHJN3qsW9"
)
return t.NewPackage("m4", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/m4/m4-"+version+".tar.bz2",
mustDecode(checksum),
pkg.TarBzip2,
), &PackageAttr{
Writable: true,
ScriptEarly: `
chmod +w tests/test-c32ispunct.sh && echo '#!/bin/sh' > tests/test-c32ispunct.sh
`,
}, (*MakeHelper)(nil),
Diffutils,
), version
}
func init() {
artifactsM[M4] = Metadata{
f: Toolchain.newM4,
Name: "m4",
Description: "a macro processor with GNU extensions",
Website: "https://www.gnu.org/software/m4/",
}
}
func (t Toolchain) newBison() (pkg.Artifact, string) {
const (
version = "3.8.2"
checksum = "BhRM6K7URj1LNOkIDCFDctSErLS-Xo5d9ba9seg10o6ACrgC1uNhED7CQPgIY29Y"
)
return t.NewPackage("bison", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/bison/bison-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
M4,
Diffutils,
Sed,
), version
}
func init() {
artifactsM[Bison] = Metadata{
f: Toolchain.newBison,
Name: "bison",
Description: "a general-purpose parser generator",
Website: "https://www.gnu.org/software/bison/",
}
}
func (t Toolchain) newSed() (pkg.Artifact, string) {
const (
version = "4.9"
checksum = "pe7HWH4PHNYrazOTlUoE1fXmhn2GOPFN_xE62i0llOr3kYGrH1g2_orDz0UtZ9Nt"
)
return t.NewPackage("sed", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/sed/sed-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Diffutils,
), version
}
func init() {
artifactsM[Sed] = Metadata{
f: Toolchain.newSed,
Name: "sed",
Description: "a non-interactive command-line text editor",
Website: "https://www.gnu.org/software/sed/",
}
}
func (t Toolchain) newAutoconf() (pkg.Artifact, string) {
const (
version = "2.72"
checksum = "-c5blYkC-xLDer3TWEqJTyh1RLbOd1c5dnRLKsDnIrg_wWNOLBpaqMY8FvmUFJ33"
)
return t.NewPackage("autoconf", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Flag: TExclusive,
}, &MakeHelper{
Check: []string{
`TESTSUITEFLAGS="-j$(nproc)"`,
"check",
},
},
M4,
Perl,
Bash,
Diffutils,
), version
}
func init() {
artifactsM[Autoconf] = Metadata{
f: Toolchain.newAutoconf,
Name: "autoconf",
Description: "M4 macros to produce self-contained configure script",
Website: "https://www.gnu.org/software/autoconf/",
}
}
func (t Toolchain) newAutomake() (pkg.Artifact, string) {
const (
version = "1.18.1"
checksum = "FjvLG_GdQP7cThTZJLDMxYpRcKdpAVG-YDs1Fj1yaHlSdh_Kx6nRGN14E0r_BjcG"
)
return t.NewPackage("automake", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/automake/automake-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Writable: true,
ScriptEarly: `
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' t/objcxx-minidemo.sh
test_disable '#!/bin/sh' t/objcxx-deps.sh
test_disable '#!/bin/sh' t/dist-no-built-sources.sh
test_disable '#!/bin/sh' t/distname.sh
test_disable '#!/bin/sh' t/pr9.sh
`,
}, (*MakeHelper)(nil),
M4,
Perl,
Grep,
Gzip,
Autoconf,
Diffutils,
), version
}
func init() {
artifactsM[Automake] = Metadata{
f: Toolchain.newAutomake,
Name: "automake",
Description: "a tool for automatically generating Makefile.in files",
Website: "https://www.gnu.org/software/automake/",
}
}
func (t Toolchain) newLibtool() (pkg.Artifact, string) {
const (
version = "2.5.4"
checksum = "pa6LSrQggh8mSJHQfwGjysAApmZlGJt8wif2cCLzqAAa2jpsTY0jZ-6stS3BWZ2Q"
)
return t.NewPackage("libtool", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/libtool/libtool-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, &MakeHelper{
Check: []string{
`TESTSUITEFLAGS="-j$(nproc)"`,
"check",
},
},
M4,
Diffutils,
), version
}
func init() {
artifactsM[Libtool] = Metadata{
f: Toolchain.newLibtool,
Name: "libtool",
Description: "a generic library support script",
Website: "https://www.gnu.org/software/libtool/",
}
}
func (t Toolchain) newGzip() (pkg.Artifact, string) {
const (
version = "1.14"
checksum = "NWhjUavnNfTDFkZJyAUonL9aCOak8GVajWX2OMlzpFnuI0ErpBFyj88mz2xSjz0q"
)
return t.NewPackage("gzip", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/gzip/gzip-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, &MakeHelper{
// dependency loop
SkipCheck: true,
}), version
}
func init() {
artifactsM[Gzip] = Metadata{
f: Toolchain.newGzip,
Name: "gzip",
Description: "a popular data compression program",
Website: "https://www.gnu.org/software/gzip/",
}
}
func (t Toolchain) newGettext() (pkg.Artifact, string) {
const (
version = "1.0"
checksum = "3MasKeEdPeFEgWgzsBKk7JqWqql1wEMbgPmzAfs-mluyokoW0N8oQVxPQoOnSdgC"
)
return t.NewPackage("gettext", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/gettext/gettext-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Writable: true,
ScriptEarly: `
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' gettext-tools/tests/msgcat-22
test_disable '#!/bin/sh' gettext-tools/tests/msgconv-2
test_disable '#!/bin/sh' gettext-tools/tests/msgconv-8
test_disable '#!/bin/sh' gettext-tools/tests/xgettext-python-3
test_disable '#!/bin/sh' gettext-tools/tests/msgmerge-compendium-6
test_disable '#!/bin/sh' gettext-tools/tests/gettextpo-1
test_disable '#!/bin/sh' gettext-tools/tests/format-c-5
test_disable '#!/bin/sh' gettext-tools/gnulib-tests/test-c32ispunct.sh
test_disable 'int main(){return 0;}' gettext-tools/gnulib-tests/test-stdcountof-h.c
touch gettext-tools/autotools/archive.dir.tar
`,
}, (*MakeHelper)(nil),
Diffutils,
Gzip,
Sed,
KernelHeaders,
), version
}
func init() {
artifactsM[Gettext] = Metadata{
f: Toolchain.newGettext,
Name: "gettext",
Description: "tools for producing multi-lingual messages",
Website: "https://www.gnu.org/software/gettext/",
}
}
func (t Toolchain) newDiffutils() (pkg.Artifact, string) {
const (
version = "3.12"
checksum = "9J5VAq5oA7eqwzS1Yvw-l3G5o-TccUrNQR3PvyB_lgdryOFAfxtvQfKfhdpquE44"
)
return t.NewPackage("diffutils", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/diffutils/diffutils-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Writable: true,
ScriptEarly: `
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh
test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c
test_disable '#!/bin/sh' tests/cmp
`,
Flag: TEarly,
}, (*MakeHelper)(nil)), version
}
func init() {
artifactsM[Diffutils] = Metadata{
f: Toolchain.newDiffutils,
Name: "diffutils",
Description: "several programs related to finding differences between files",
Website: "https://www.gnu.org/software/diffutils/",
}
}
func (t Toolchain) newPatch() (pkg.Artifact, string) {
const (
version = "2.8"
checksum = "MA0BQc662i8QYBD-DdGgyyfTwaeALZ1K0yusV9rAmNiIsQdX-69YC4t9JEGXZkeR"
)
return t.NewPackage("patch", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/patch/patch-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Writable: true,
ScriptEarly: `
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' tests/ed-style
test_disable '#!/bin/sh' tests/need-filename
`,
Flag: TEarly,
}, (*MakeHelper)(nil)), version
}
func init() {
artifactsM[Patch] = Metadata{
f: Toolchain.newPatch,
Name: "patch",
Description: "a program to apply diff output to files",
Website: "https://savannah.gnu.org/projects/patch/",
}
}
func (t Toolchain) newBash() (pkg.Artifact, string) {
const (
version = "5.3"
checksum = "4LQ_GRoB_ko-Ih8QPf_xRKA02xAm_TOxQgcJLmFDT6udUPxTAWrsj-ZNeuTusyDq"
)
return t.NewPackage("bash", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/bash/bash-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Flag: TEarly,
}, &MakeHelper{
Script: "ln -s bash /work/system/bin/sh\n",
Configure: [][2]string{
{"without-bash-malloc"},
},
}), version
}
func init() {
artifactsM[Bash] = Metadata{
f: Toolchain.newBash,
Name: "bash",
Description: "the Bourne Again SHell",
Website: "https://www.gnu.org/software/bash/",
}
}
func (t Toolchain) newCoreutils() (pkg.Artifact, string) {
const (
version = "9.9"
checksum = "B1_TaXj1j5aiVIcazLWu8Ix03wDV54uo2_iBry4qHG6Y-9bjDpUPlkNLmU_3Nvw6"
)
return t.NewPackage("coreutils", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/coreutils/coreutils-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Writable: true,
ScriptEarly: `
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh
test_disable '#!/bin/sh' tests/split/line-bytes.sh
test_disable '#!/bin/sh' tests/dd/no-allocate.sh
test_disable '#!/bin/sh' tests/env/env.sh
test_disable 'int main(){return 0;}' gnulib-tests/test-chown.c
test_disable 'int main(){return 0;}' gnulib-tests/test-fchownat.c
test_disable 'int main(){return 0;}' gnulib-tests/test-lchown.c
`,
Flag: TEarly,
}, &MakeHelper{
Configure: [][2]string{
{"enable-single-binary", "symlinks"},
},
},
Perl,
Bash,
KernelHeaders,
), version
}
func init() {
artifactsM[Coreutils] = Metadata{
f: Toolchain.newCoreutils,
Name: "coreutils",
Description: "the basic file, shell and text manipulation utilities",
Website: "https://www.gnu.org/software/coreutils/",
}
}
func (t Toolchain) newTexinfo() (pkg.Artifact, string) {
const (
version = "7.2"
checksum = "9EelM5b7QGMAY5DKrAm_El8lofBGuFWlaBPSBhh7l_VQE8054MBmC0KBvGrABqjv"
)
return t.NewPackage("texinfo", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/texinfo/texinfo-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, &MakeHelper{
// nonstandard glibc extension
SkipCheck: true,
},
Perl,
), version
}
func init() {
artifactsM[Texinfo] = Metadata{
f: Toolchain.newTexinfo,
Name: "texinfo",
Description: "the GNU square-wheel-reinvension of man pages",
Website: "https://www.gnu.org/software/texinfo/",
}
}
func (t Toolchain) newGperf() (pkg.Artifact, string) {
const (
version = "3.3"
checksum = "RtIy9pPb_Bb8-31J2Nw-rRGso2JlS-lDlVhuNYhqR7Nt4xM_nObznxAlBMnarJv7"
)
return t.NewPackage("gperf", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gperf/gperf-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Diffutils,
), version
}
func init() {
artifactsM[Gperf] = Metadata{
f: Toolchain.newGperf,
Name: "gperf",
Description: "a perfect hash function generator",
Website: "https://www.gnu.org/software/gperf/",
}
}
func (t Toolchain) newGawk() (pkg.Artifact, string) {
const (
version = "5.3.2"
checksum = "uIs0d14h_d2DgMGYwrPtegGNyt_bxzG3D6Fe-MmExx_pVoVkQaHzrtmiXVr6NHKk"
)
return t.NewPackage("gawk", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/gawk/gawk-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Flag: TEarly,
}, &MakeHelper{
// dependency loop
SkipCheck: true,
}), version
}
func init() {
artifactsM[Gawk] = Metadata{
f: Toolchain.newGawk,
Name: "gawk",
Description: "an implementation of awk with GNU extensions",
Website: "https://www.gnu.org/software/gawk/",
}
}
func (t Toolchain) newGrep() (pkg.Artifact, string) {
const (
version = "3.12"
checksum = "qMB4RjaPNRRYsxix6YOrjE8gyAT1zVSTy4nW4wKW9fqa0CHYAuWgPwDTirENzm_1"
)
return t.NewPackage("grep", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/grep/grep-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Writable: true,
ScriptEarly: `
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh
test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c
`,
}, (*MakeHelper)(nil),
Diffutils,
), version
}
func init() {
artifactsM[Grep] = Metadata{
f: Toolchain.newGrep,
Name: "grep",
Description: "searches input for lines containing a match to a pattern",
Website: "https://www.gnu.org/software/grep/",
}
}
func (t Toolchain) newFindutils() (pkg.Artifact, string) {
const (
version = "4.10.0"
checksum = "ZXABdNBQXL7QjTygynRRTdXYWxQKZ0Wn5eMd3NUnxR0xaS0u0VfcKoTlbo50zxv6"
)
return t.NewPackage("findutils", version, pkg.NewHTTPGet(
nil, "https://ftpmirror.gnu.org/gnu/findutils/findutils-"+version+".tar.xz",
mustDecode(checksum),
), &PackageAttr{
SourceKind: sourceTarXZ,
ScriptEarly: `
echo '#!/bin/sh' > gnulib-tests/test-c32ispunct.sh
echo 'int main(){return 0;}' > tests/xargs/test-sigusr.c
`,
}, (*MakeHelper)(nil),
Diffutils,
XZ,
Sed,
), version
}
func init() {
artifactsM[Findutils] = Metadata{
f: Toolchain.newFindutils,
Name: "findutils",
Description: "the basic directory searching utilities",
Website: "https://www.gnu.org/software/findutils/",
}
}
func (t Toolchain) newBC() (pkg.Artifact, string) {
const (
version = "1.08.2"
checksum = "8h6f3hjV80XiFs6v9HOPF2KEyg1kuOgn5eeFdVspV05ODBVQss-ey5glc8AmneLy"
)
return t.NewPackage("bc", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/bc/bc-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
// source expected to be writable
Writable: true,
Chmod: true,
}, (*MakeHelper)(nil),
Perl,
Texinfo,
), version
}
func init() {
artifactsM[BC] = Metadata{
f: Toolchain.newBC,
Name: "bc",
Description: "an arbitrary precision numeric processing language",
Website: "https://www.gnu.org/software/bc/",
}
}
func (t Toolchain) newLibiconv() (pkg.Artifact, string) {
const (
version = "1.18"
checksum = "iV5q3VxP5VPdJ-X7O5OQI4fGm8VjeYb5viLd1L3eAHg26bbHb2_Qn63XPF3ucVZr"
)
return t.NewPackage("libiconv", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/libiconv/libiconv-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, (*MakeHelper)(nil)), version
}
func init() {
artifactsM[Libiconv] = Metadata{
f: Toolchain.newLibiconv,
Name: "libiconv",
Description: "iconv implementation independent of glibc",
Website: "https://www.gnu.org/software/libiconv/",
}
}
func (t Toolchain) newTar() (pkg.Artifact, string) {
const (
version = "1.35"
checksum = "zSaoSlVUDW0dSfm4sbL4FrXLFR8U40Fh3zY5DWhR5NCIJ6GjU6Kc4VZo2-ZqpBRA"
)
return t.NewPackage("tar", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/tar/tar-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, &MakeHelper{
Configure: [][2]string{
{"disable-acl"},
{"without-posix-acls"},
{"without-xattrs"},
},
Check: []string{
// very expensive
"TARTEST_SKIP_LARGE_FILES=1",
`TESTSUITEFLAGS="-j$(nproc)"`,
"check",
},
},
Diffutils,
Gzip,
Bzip2,
Zstd,
), version
}
func init() {
artifactsM[Tar] = Metadata{
f: Toolchain.newTar,
Name: "tar",
Description: "provides the ability to create tar archives",
Website: "https://www.gnu.org/software/tar/",
}
}
func (t Toolchain) newBinutils() (pkg.Artifact, string) {
const (
version = "2.45"
checksum = "hlLtqqHDmzAT2OQVHaKEd_io2DGFvJkaeS-igBuK8bRRir7LUKGHgHYNkDVKaHTT"
)
return t.NewPackage("binutils", version, pkg.NewHTTPGetTar(
nil, "https://ftpmirror.gnu.org/gnu/binutils/binutils-"+version+".tar.bz2",
mustDecode(checksum),
pkg.TarBzip2,
), nil, (*MakeHelper)(nil),
Bash,
), version
}
func init() {
artifactsM[Binutils] = Metadata{
f: Toolchain.newBinutils,
Name: "binutils",
Description: "a collection of binary tools",
Website: "https://www.gnu.org/software/binutils/",
}
}
func (t Toolchain) newGMP() (pkg.Artifact, string) {
const (
version = "6.3.0"
checksum = "yrgbgEDWKDdMWVHh7gPbVl56-sRtVVhfvv0M_LX7xMUUk_mvZ1QOJEAnt7g4i3k5"
)
return t.NewPackage("gmp", version, pkg.NewHTTPGetTar(
nil, "https://gcc.gnu.org/pub/gcc/infrastructure/"+
"gmp-"+version+".tar.bz2",
mustDecode(checksum),
pkg.TarBzip2,
), nil, (*MakeHelper)(nil),
M4,
), version
}
func init() {
artifactsM[GMP] = Metadata{
f: Toolchain.newGMP,
Name: "gmp",
Description: "a free library for arbitrary precision arithmetic",
Website: "https://gmplib.org/",
}
}
func (t Toolchain) newMPFR() (pkg.Artifact, string) {
const (
version = "4.2.2"
checksum = "wN3gx0zfIuCn9r3VAn_9bmfvAYILwrRfgBjYSD1IjLqyLrLojNN5vKyQuTE9kA-B"
)
return t.NewPackage("mpfr", version, pkg.NewHTTPGetTar(
nil, "https://gcc.gnu.org/pub/gcc/infrastructure/"+
"mpfr-"+version+".tar.bz2",
mustDecode(checksum),
pkg.TarBzip2,
), nil, (*MakeHelper)(nil),
GMP,
), version
}
func init() {
artifactsM[MPFR] = Metadata{
f: Toolchain.newMPFR,
Name: "mpfr",
Description: "a C library for multiple-precision floating-point computations",
Website: "https://www.mpfr.org/",
}
}
func (t Toolchain) newMPC() (pkg.Artifact, string) {
const (
version = "1.3.1"
checksum = "o8r8K9R4x7PuRx0-JE3-bC5jZQrtxGV2nkB773aqJ3uaxOiBDCID1gKjPaaDxX4V"
)
return t.NewPackage("mpc", version, pkg.NewHTTPGetTar(
nil, "https://gcc.gnu.org/pub/gcc/infrastructure/"+
"mpc-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
GMP,
MPFR,
), version
}
func init() {
artifactsM[MPC] = Metadata{
f: Toolchain.newMPC,
Name: "mpc",
Description: "a C library for the arithmetic of complex numbers",
Website: "https://www.multiprecision.org/",
}
}
func (t Toolchain) newGCC() (pkg.Artifact, string) {
const (
version = "15.2.0"
checksum = "TXJ5WrbXlGLzy1swghQTr4qxgDCyIZFgJry51XEPTBZ8QYbVmFeB4lZbSMtPJ-a1"
)
return t.NewPackage("gcc", version, pkg.NewHTTPGetTar(
nil, "https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/"+
"gcc-"+version+"/gcc-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
Patches: [][2]string{
{"musl-off64_t-loff_t", `diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index 180f5c31d74..44d7ea73f7d 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -365,11 +365,7 @@ enum {
typedef loff_t libgo_loff_t_type;
#endif
-#if defined(HAVE_OFF64_T)
-typedef off64_t libgo_off_t_type;
-#else
typedef off_t libgo_off_t_type;
-#endif
// The following section introduces explicit references to types and
// constants of interest to support bootstrapping libgo using a
`},
{"musl-legacy-lfs", `diff --git a/libgo/go/internal/syscall/unix/at_largefile.go b/libgo/go/internal/syscall/unix/at_largefile.go
index 82e0dcfd074..16151ecad1b 100644
--- a/libgo/go/internal/syscall/unix/at_largefile.go
+++ b/libgo/go/internal/syscall/unix/at_largefile.go
@@ -10,5 +10,5 @@ import (
"syscall"
)
-//extern fstatat64
+//extern fstatat
func fstatat(int32, *byte, *syscall.Stat_t, int32) int32
diff --git a/libgo/go/os/dir_largefile.go b/libgo/go/os/dir_largefile.go
index 1fc5ee0771f..0c6dffe1a75 100644
--- a/libgo/go/os/dir_largefile.go
+++ b/libgo/go/os/dir_largefile.go
@@ -11,5 +11,5 @@ package os
import "syscall"
-//extern readdir64
+//extern readdir
func libc_readdir(*syscall.DIR) *syscall.Dirent
diff --git a/libgo/go/syscall/libcall_glibc.go b/libgo/go/syscall/libcall_glibc.go
index 5c1ec483c75..5a1245ed44b 100644
--- a/libgo/go/syscall/libcall_glibc.go
+++ b/libgo/go/syscall/libcall_glibc.go
@@ -114,7 +114,7 @@ func Pipe2(p []int, flags int) (err error) {
}
//sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error)
-//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
+//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
if race.Enabled {
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 03ca7261b59..ad21fd0b3ac 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -158,7 +158,7 @@ func Reboot(cmd int) (err error) {
//adjtimex(buf *Timex) _C_int
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//fstatfs64(fd _C_int, buf *Statfs_t) _C_int
+//fstatfs(fd _C_int, buf *Statfs_t) _C_int
func Gettid() (tid int) {
r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0)
@@ -245,7 +245,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
}
//sys Statfs(path string, buf *Statfs_t) (err error)
-//statfs64(path *byte, buf *Statfs_t) _C_int
+//statfs(path *byte, buf *Statfs_t) _C_int
//sysnb Sysinfo(info *Sysinfo_t) (err error)
//sysinfo(info *Sysinfo_t) _C_int
diff --git a/libgo/go/syscall/libcall_posix_largefile.go b/libgo/go/syscall/libcall_posix_largefile.go
index f90055bb29a..334212f0af1 100644
--- a/libgo/go/syscall/libcall_posix_largefile.go
+++ b/libgo/go/syscall/libcall_posix_largefile.go
@@ -10,40 +10,40 @@
package syscall
//sys Creat(path string, mode uint32) (fd int, err error)
-//creat64(path *byte, mode Mode_t) _C_int
+//creat(path *byte, mode Mode_t) _C_int
//sys Fstat(fd int, stat *Stat_t) (err error)
-//fstat64(fd _C_int, stat *Stat_t) _C_int
+//fstat(fd _C_int, stat *Stat_t) _C_int
//sys Ftruncate(fd int, length int64) (err error)
-//ftruncate64(fd _C_int, length Offset_t) _C_int
+//ftruncate(fd _C_int, length Offset_t) _C_int
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//getrlimit64(resource _C_int, rlim *Rlimit) _C_int
+//getrlimit(resource _C_int, rlim *Rlimit) _C_int
//sys Lstat(path string, stat *Stat_t) (err error)
-//lstat64(path *byte, stat *Stat_t) _C_int
+//lstat(path *byte, stat *Stat_t) _C_int
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
+//mmap(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int
+//__go_open(path *byte, mode _C_int, perm Mode_t) _C_int
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
+//pread(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
+//pwrite(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
//sys Seek(fd int, offset int64, whence int) (off int64, err error)
-//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t
+//lseek(fd _C_int, offset Offset_t, whence _C_int) Offset_t
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//setrlimit64(resource int, rlim *Rlimit) _C_int
+//setrlimit(resource int, rlim *Rlimit) _C_int
//sys Stat(path string, stat *Stat_t) (err error)
-//stat64(path *byte, stat *Stat_t) _C_int
+//stat(path *byte, stat *Stat_t) _C_int
//sys Truncate(path string, length int64) (err error)
-//truncate64(path *byte, length Offset_t) _C_int
+//truncate(path *byte, length Offset_t) _C_int
diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c
index f84860891e6..7efc9615985 100644
--- a/libgo/runtime/go-varargs.c
+++ b/libgo/runtime/go-varargs.c
@@ -84,7 +84,7 @@ __go_ioctl_ptr (int d, int request, void *arg)
int
__go_open64 (char *path, int mode, mode_t perm)
{
- return open64 (path, mode, perm);
+ return open (path, mode, perm);
}
#endif
`},
},
ScriptEarly: `
ln -s system/lib /
ln -s system/lib /work/
`,
// GCC spends most of its time in its many configure scripts, however
// it also saturates the CPU for a consequential amount of time.
Flag: TExclusive,
}, &MakeHelper{
Configure: [][2]string{
{"disable-multilib"},
{"with-multilib-list", `""`},
{"enable-default-pie"},
{"disable-nls"},
{"with-gnu-as"},
{"with-gnu-ld"},
{"with-system-zlib"},
{"enable-languages", "c,c++,go"},
{"with-native-system-header-dir", "/system/include"},
},
Make: []string{
"BOOT_CFLAGS='-O2 -g'",
"bootstrap",
},
// This toolchain is hacked to pieces, it is not expected to ever work
// well in its current state. That does not matter as long as the
// toolchain it produces passes its own test suite.
SkipCheck: true,
},
Binutils,
GMP,
MPFR,
MPC,
Zlib,
Libucontext,
KernelHeaders,
), version
}
func init() {
artifactsM[gcc] = Metadata{
f: Toolchain.newGCC,
Name: "gcc",
Description: "The GNU Compiler Collection",
Website: "https://www.gnu.org/software/gcc/",
}
}