From 8341f6ed26bb8b9e4269e594d2f6b864d534546b Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 22 Oct 2026 23:22:02 +0900 Subject: internal/rosa/make: optionally omit program name flags This does not work on some configure scripts pretending to be autoconf. Signed-off-by: Ophestra --- internal/rosa/make.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'internal/rosa/make.go') 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 } -- cgit v1.3.1