aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/make.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/make.go')
-rw-r--r--internal/rosa/make.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go
index 2fdc2dec..0747d850 100644
--- a/internal/rosa/make.go
+++ b/internal/rosa/make.go
@@ -39,6 +39,8 @@ type MakeHelper struct {
Host string
// Target triple, zero value is equivalent to the Rosa OS triple.
Build string
+ // Do not clear program prefix/suffix.
+ DefaultName bool
// Use the dependency-free [GenericHelper] make.
Early bool
@@ -111,14 +113,14 @@ func (attr *MakeHelper) script(t Toolchain, name string) string {
if attr == nil {
attr = new(MakeHelper)
}
- cross := t.cross()
+ cross, arch := t.cross(), t.Arch()
var configure string
target := t.triple()
if cross {
configure += `
-export CC='clang --target=` + target + ` -isysroot=/system/` + t.arch + `'
-export CXX='clang++ --target=` + target + ` -isysroot=/system/` + t.arch + `'
+export CC='clang --target=` + target + ` -isysroot=/system/` + arch + `'
+export CXX='clang++ --target=` + target + ` -isysroot=/system/` + arch + `'
`
}
@@ -141,9 +143,12 @@ export CXX='clang++ --target=` + target + ` -isysroot=/system/` + t.arch + `'
host = attr.Host
}
if attr.Host != `""` {
- configure += ` \
+ if !attr.DefaultName {
+ configure += ` \
--program-prefix='' \
- --program-suffix='' \
+ --program-suffix=''`
+ }
+ configure += ` \
--host=` + host + ` \
--target=` + host
}