aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/make.go15
-rw-r--r--internal/rosa/state.go1
2 files changed, 11 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
}
diff --git a/internal/rosa/state.go b/internal/rosa/state.go
index e6d6e4a5..53e38c49 100644
--- a/internal/rosa/state.go
+++ b/internal/rosa/state.go
@@ -886,6 +886,7 @@ func (s *S) getFrame() azalea.Frame {
k("chdir"): &chdir,
k("configureName"): &attr.ConfigureName,
k("forceAutoconf"): &attr.ForceAutoconf,
+ k("defaultName"): &attr.DefaultName,
k("configure"): &attr.Configure,
k("host"): &attr.Host,
k("build"): &attr.Build,