diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-28 03:05:09 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-28 04:12:42 +0900 |
| commit | 53e9dd6aa933c1a5b43da83a88d5e07bf27285bf (patch) | |
| tree | 75d23f52901368c2e9764df631d37b8eb7484723 /internal/rosa/make.go | |
| parent | 7e3ba55cdc4d4a7c19deb65879e8abbb12a8e458 (diff) | |
internal/rosa: do not hard code prefix
This allows the prefix to be changed, at runtime if needed.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/make.go')
| -rw-r--r-- | internal/rosa/make.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go index 877648c0..7a8bdec9 100644 --- a/internal/rosa/make.go +++ b/internal/rosa/make.go @@ -120,7 +120,7 @@ func (attr *MakeHelper) script(t Toolchain, name string) string { attr = new(MakeHelper) } cross, arch := t.cross(), t.Arch() - sysroot := "/system/" + arch + sysroot := Prefix + "/" + arch var configure string target := t.triple() @@ -129,7 +129,7 @@ func (attr *MakeHelper) script(t Toolchain, name string) string { export CC='clang --target=` + target + ` --sysroot=` + sysroot + `' export CXX='clang++ --target=` + target + ` --sysroot=` + sysroot + `' export PKG_CONFIG_SYSROOT_DIR='` + sysroot + `' -export PKG_CONFIG_LIBDIR='` + sysroot + `/system/lib/pkgconfig:` + sysroot + `/system/share/pkgconfig' +export PKG_CONFIG_LIBDIR='` + sysroot + Prefix + `/lib/pkgconfig:` + sysroot + Prefix + `/share/pkgconfig' ` } configure += attr.ScriptConfigureEarly @@ -142,7 +142,7 @@ export PKG_CONFIG_LIBDIR='` + sysroot + `/system/lib/pkgconfig:` + sysroot + `/s } if attr.ForceAutoconf || attr.ConfigureName == "" { configure += ` \ - --prefix=/system` + --prefix=` + Prefix host := target build := host if cross { @@ -160,7 +160,7 @@ export PKG_CONFIG_LIBDIR='` + sysroot + `/system/lib/pkgconfig:` + sysroot + `/s } if !attr.OmitSysroot && cross { configure += ` \ - --with-sysroot='/system/` + arch + `'` + --with-sysroot='` + Prefix + `/` + arch + `'` } configure += ` \ --host=` + host |
