diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/rosa/llvm_test.go | 2 | ||||
| -rw-r--r-- | internal/rosa/make.go | 20 | ||||
| -rw-r--r-- | internal/rosa/package/gnu.az | 1 | ||||
| -rw-r--r-- | internal/rosa/package/gzip/package.az | 3 | ||||
| -rw-r--r-- | internal/rosa/package/make.az | 49 | ||||
| -rw-r--r-- | internal/rosa/package/perl.az | 1 | ||||
| -rw-r--r-- | internal/rosa/package/toybox.az | 1 | ||||
| -rw-r--r-- | internal/rosa/state.go | 1 |
8 files changed, 65 insertions, 13 deletions
diff --git a/internal/rosa/llvm_test.go b/internal/rosa/llvm_test.go index 29f2611c..bc017f3e 100644 --- a/internal/rosa/llvm_test.go +++ b/internal/rosa/llvm_test.go @@ -8,7 +8,7 @@ import ( ) func TestLLVMInputs(t *testing.T) { - const wantInputCount = 600 + const wantInputCount = 614 _, llvm := rosa.MustLoad(rosa.H("llvm")) var n int 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 + `' ` } diff --git a/internal/rosa/package/gnu.az b/internal/rosa/package/gnu.az index e117173e..5481e1f0 100644 --- a/internal/rosa/package/gnu.az +++ b/internal/rosa/package/gnu.az @@ -198,6 +198,7 @@ test_disable '#!/bin/sh' tests/need-filename toyboxEarly = true; exec = make { + early = true; defaults = false; }; } diff --git a/internal/rosa/package/gzip/package.az b/internal/rosa/package/gzip/package.az index 6c6b3b1f..94c67a89 100644 --- a/internal/rosa/package/gzip/package.az +++ b/internal/rosa/package/gzip/package.az @@ -10,8 +10,11 @@ package gzip { compress = gzip; }; patches = [ "late-include.patch" ]; + toyboxEarly = true; exec = make { + early = true; + defaults = false; // dependency loop check = nil; }; diff --git a/internal/rosa/package/make.az b/internal/rosa/package/make.az index 771bd20d..4aaf5736 100644 --- a/internal/rosa/package/make.az +++ b/internal/rosa/package/make.az @@ -1,26 +1,61 @@ -package make { - description = "a tool which controls the generation of executables and other non-source files"; - website = "https://www.gnu.org/software/make"; - anitya = 1877; +package make-source { + description = "GNU make source tree"; + exclude = true; version# = "4.4.1"; - source = remoteTar { + output = remoteTar { url = "https://mirrors.kernel.org/gnu/make/make-"+version+".tar.gz"; checksum = "YS_B07ZcAy9PbaK5_vKGj64SrxO2VMpnMKfc9I0Q9IC1rn0RwOH7802pJoj2Mq4a"; compress = gzip; }; +} +package make-early { + description = "early, dependency-free build of make"; + exclude = true; + + source = make-source; toyboxEarly = true; exec = generic { - build = `/usr/src/make/configure \ + build = `/usr/src/make-early/configure \ --prefix=/system \ - --host= '`+triple+`' \ + --host='`+triple+`' \ + --target='`+triple+`' \ --build='`+hostTriple+`' \ --disable-dependency-tracking ./build.sh `; // test suite wants perl + check = ""; + install = "./make DESTDIR=/work install\n"; }; } +package make { + description = "a tool which controls the generation of executables and other non-source files"; + website = "https://www.gnu.org/software/make"; + anitya = 1877; + + source = make-source; + toyboxEarly = true; + + // GNU tar not yet available + writable = true; + early = ` +chmod +w tests/scripts/misc +rm \ + tests/scripts/misc/close_stdout \ + tests/scripts/misc/general4 +`; + + exec = make { + early = true; + defaults = false; + }; + + tools = [ + perl, + gzip, + ]; +} diff --git a/internal/rosa/package/perl.az b/internal/rosa/package/perl.az index 8d21c8ca..3009c75b 100644 --- a/internal/rosa/package/perl.az +++ b/internal/rosa/package/perl.az @@ -28,6 +28,7 @@ disable_test ext/POSIX/t/time.t toyboxEarly = true; exec = make { + early = true; defaults = false; chdir = false; diff --git a/internal/rosa/package/toybox.az b/internal/rosa/package/toybox.az index b90e08d2..720c736a 100644 --- a/internal/rosa/package/toybox.az +++ b/internal/rosa/package/toybox.az @@ -22,6 +22,7 @@ package toybox { toyboxEarly = true; exec = make { + early = true; defaults = false; chdir = false; diff --git a/internal/rosa/state.go b/internal/rosa/state.go index bda8d32e..e6d6e4a5 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -877,6 +877,7 @@ func (s *S) getFrame() azalea.Frame { defaults, chdir, checkEarly := true, true, true attr.Configure, attr.Check = []KV{}, []string{} if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ + k("early"): &attr.Early, k("defaults"): &defaults, k("generate"): &attr.Generate, k("preMake"): &attr.ScriptMakeEarly, |
