forked from security/hakurei
internal/rosa/make: expose --host
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
|
||||
// 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
|
||||
|
||||
@@ -16,6 +16,7 @@ func (t Toolchain) newZlib() pkg.Artifact {
|
||||
Env: []string{
|
||||
"CC=clang -fPIC",
|
||||
},
|
||||
Host: `""`,
|
||||
Build: `""`,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user