diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-22 14:17:56 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-22 16:24:59 +0900 |
| commit | 016d745b94b31d0ef4fd54d2a04dc9e09b3f0d20 (patch) | |
| tree | 9e4b1429db31c2b590252f92a1d3f8056ca481a7 /internal/rosa/make.go | |
| parent | fe1acbe8bc14d8d8ae19e94d2b80576f6d6b183e (diff) | |
internal/rosa: bootstrap make in two steps
This enables the test suite in the second make stage. This change also
fixes a typo in the second stage make build script.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/make.go')
| -rw-r--r-- | internal/rosa/make.go | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go index f46780f5..bf0f3cea 100644 --- a/internal/rosa/make.go +++ b/internal/rosa/make.go @@ -5,7 +5,10 @@ import ( "strings" ) -var _make = H("make") +var ( + _make = H("make") + _makeEarly = H("make-early") +) // MakeHelper wraps the make program and its surrounding build system. type MakeHelper struct { @@ -37,6 +40,8 @@ type MakeHelper struct { // Target triple, zero value is equivalent to the Rosa OS triple. Build string + // Use the dependency-free [GenericHelper] make. + Early bool // Extra make targets. Make []string // Whether to skip the check target. @@ -53,15 +58,20 @@ var _ Helper = new(MakeHelper) // tools returns make and other optional dependencies. func (attr *MakeHelper) tools() P { + h := _make + if attr != nil && attr.Early { + h = _makeEarly + } + if attr == nil || !attr.OmitDefaults { return P{ - _make, + h, _awk, _coreutils, } } - return P{_make} + return P{h} } // inputs is a noop. @@ -107,8 +117,8 @@ func (attr *MakeHelper) script(t Toolchain, name string) string { target := t.triple() if cross { configure += ` -export CC='clang --target=` + target + ` --sysroot=/system/` + t.arch + `' -export CXX='clang++ --target=` + target + ` --sysroot=/system/` + t.arch + `' +export CC='clang --target=` + target + ` -isysroot=/system/` + t.arch + `' +export CXX='clang++ --target=` + target + ` -isysroot=/system/` + t.arch + `' ` } |
