aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/make.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-23 04:16:07 +0900
committerOphestra <cat@gensokyo.uk>2026-10-23 04:16:07 +0900
commit54466f0e43b858f36cace47ceb3cab121614f837 (patch)
tree8dea2c09ea020fff8dfb05a3d573cc7bf3739085 /internal/rosa/make.go
parent609f6504e801096bb6f657b768bb5d1f49199080 (diff)
internal/rosa: set pkg-config libdir
We do not want to put up with the pkg-config wrappers. This does what the wrappers would have done. CMake does this automatically, but not meson and autotools. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/make.go')
-rw-r--r--internal/rosa/make.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go
index c499de1e..e127fe02 100644
--- a/internal/rosa/make.go
+++ b/internal/rosa/make.go
@@ -116,13 +116,16 @@ func (attr *MakeHelper) script(t Toolchain, name string) string {
attr = new(MakeHelper)
}
cross, arch := t.cross(), t.Arch()
+ sysroot := "/system/" + arch
var configure string
target := t.triple()
if cross {
configure += `
-export CC='clang --target=` + target + ` --sysroot=/system/` + arch + `'
-export CXX='clang++ --target=` + target + ` --sysroot=/system/` + arch + `'
+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'
`
}