internal/rosa/make: expose --host
All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m26s
Test / ShareFS (push) Successful in 4m43s
Test / Hpkg (push) Successful in 5m18s
Test / Hakurei (race detector) (push) Successful in 6m37s
Test / Sandbox (race detector) (push) Successful in 2m30s
Test / Flake checks (push) Successful in 1m54s
All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m26s
Test / ShareFS (push) Successful in 4m43s
Test / Hpkg (push) Successful in 5m18s
Test / Hakurei (race detector) (push) Successful in 6m37s
Test / Sandbox (race detector) (push) Successful in 2m30s
Test / Flake checks (push) Successful in 1m54s
This should be set alongside --build. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -57,6 +57,8 @@ type MakeAttr struct {
|
|||||||
Configure [][2]string
|
Configure [][2]string
|
||||||
// Extra make targets.
|
// Extra make targets.
|
||||||
Make []string
|
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.
|
// Target triple, zero value is equivalent to the Rosa OS triple.
|
||||||
Build string
|
Build string
|
||||||
// Whether to skip the check target.
|
// Whether to skip the check target.
|
||||||
@@ -88,6 +90,11 @@ func (t Toolchain) NewViaMake(
|
|||||||
if attr == nil {
|
if attr == nil {
|
||||||
attr = new(MakeAttr)
|
attr = new(MakeAttr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
host := `"${ROSA_TRIPLE}"`
|
||||||
|
if attr.Host != "" {
|
||||||
|
host = attr.Host
|
||||||
|
}
|
||||||
build := `"${ROSA_TRIPLE}"`
|
build := `"${ROSA_TRIPLE}"`
|
||||||
if attr.Build != "" {
|
if attr.Build != "" {
|
||||||
build = attr.Build
|
build = attr.Build
|
||||||
@@ -99,6 +106,10 @@ func (t Toolchain) NewViaMake(
|
|||||||
/usr/src/` + name + `/configure \
|
/usr/src/` + name + `/configure \
|
||||||
--prefix=/system`
|
--prefix=/system`
|
||||||
|
|
||||||
|
if attr.Host != `""` {
|
||||||
|
configure += ` \
|
||||||
|
--host=` + host
|
||||||
|
}
|
||||||
if attr.Build != `""` {
|
if attr.Build != `""` {
|
||||||
configure += ` \
|
configure += ` \
|
||||||
--build=` + build
|
--build=` + build
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ func (t Toolchain) newZlib() pkg.Artifact {
|
|||||||
Env: []string{
|
Env: []string{
|
||||||
"CC=clang -fPIC",
|
"CC=clang -fPIC",
|
||||||
},
|
},
|
||||||
|
Host: `""`,
|
||||||
Build: `""`,
|
Build: `""`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user