diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-22 13:42:26 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-22 15:14:09 +0900 |
| commit | d4519e2075ed486bf5e65edf0f047f541ddd422f (patch) | |
| tree | 70a802d201f355228e1d60c32c7890b2aa9bb6f1 /internal | |
| parent | 7f1e4cf43c8ad6dcf771fa43d28c0ce3c093e319 (diff) | |
internal/rosa/make: expose --host
This should be set alongside --build.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/rosa/make.go | 11 | ||||
| -rw-r--r-- | internal/rosa/zlib.go | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go index 63f65410..304c3714 100644 --- a/internal/rosa/make.go +++ b/internal/rosa/make.go @@ -57,6 +57,8 @@ type MakeAttr struct { Configure [][2]string // Extra make targets. Make []string + // Host target triple, zero value is equivalent to the Rosa OS triple. + Host string // Target triple, zero value is equivalent to the Rosa OS triple. Build string // Whether to skip the check target. @@ -88,6 +90,11 @@ func (t Toolchain) NewViaMake( if attr == nil { attr = new(MakeAttr) } + + host := `"${ROSA_TRIPLE}"` + if attr.Host != "" { + host = attr.Host + } build := `"${ROSA_TRIPLE}"` if attr.Build != "" { build = attr.Build @@ -99,6 +106,10 @@ func (t Toolchain) NewViaMake( /usr/src/` + name + `/configure \ --prefix=/system` + if attr.Host != `""` { + configure += ` \ + --host=` + host + } if attr.Build != `""` { configure += ` \ --build=` + build diff --git a/internal/rosa/zlib.go b/internal/rosa/zlib.go index 6ebd5a3d..3fc659ee 100644 --- a/internal/rosa/zlib.go +++ b/internal/rosa/zlib.go @@ -16,6 +16,7 @@ func (t Toolchain) newZlib() pkg.Artifact { Env: []string{ "CC=clang -fPIC", }, + Host: `""`, Build: `""`, }) } |
