diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-22 03:00:59 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-22 03:00:59 +0900 |
| commit | 094a62ba9d049dfa5b9e6a400020dbc81a789ab4 (patch) | |
| tree | a7054c938fd7790c958d31c4ad5f6439b7dae2ae | |
| parent | 6420b6e6e881c67f19e7f4d37dc612d19a0c0b93 (diff) | |
internal/rosa: diffutils artifact
LLVM tests are not happy with busybox diff.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/rosa/gnu.go | 29 | ||||
| -rw-r--r-- | internal/rosa/llvm.go | 2 |
2 files changed, 31 insertions, 0 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index c609f68a..1ee76b85 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -110,3 +110,32 @@ make DESTDIR=/work install pkg.TarGzip, ))) } + +// NewDiffutils returns a [pkg.Artifact] containing an installation of GNU diffutils. +func (t Toolchain) NewDiffutils() pkg.Artifact { + const ( + version = "3.12" + checksum = "9J5VAq5oA7eqwzS1Yvw-l3G5o-TccUrNQR3PvyB_lgdryOFAfxtvQfKfhdpquE44" + ) + return t.New("diffutils-"+version, []pkg.Artifact{ + t.NewMake(), + }, nil, nil, ` +cd /usr/src/diffutils +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 + +cd "$(mktemp -d)" +/usr/src/diffutils/configure \ + --prefix=/system \ + --build="${ROSA_TRIPLE}" +make "-j$(nproc)" check +make DESTDIR=/work install +`, pkg.Path(AbsUsrSrc.Append("diffutils"), true, pkg.NewHTTPGetTar( + nil, + "https://ftp.gnu.org/gnu/diffutils/diffutils-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ))) +} diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go index 4d2caf85..898c92cc 100644 --- a/internal/rosa/llvm.go +++ b/internal/rosa/llvm.go @@ -127,6 +127,8 @@ func (t Toolchain) newLLVM(variant string, attr *llvmAttr) pkg.Artifact { extra := []pkg.Artifact{ t.NewLibffi(), t.NewPython(), + t.NewPerl(), + t.NewDiffutils(), t.NewKernelHeaders(), } if t == toolchainStage3 { |
