From ac4cec1625da50d6abd9fca40446e7f75aa5bd37 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 11 Nov 2026 21:59:18 +0900 Subject: internal/rosa: set common cross-compile environment This change avoids duplicating this piece of code all over the place. Signed-off-by: Ophestra --- internal/rosa/doc.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'internal/rosa/doc.go') diff --git a/internal/rosa/doc.go b/internal/rosa/doc.go index 9c61a751..313d4f17 100644 --- a/internal/rosa/doc.go +++ b/internal/rosa/doc.go @@ -163,16 +163,15 @@ declared at the top level: // whether to replace /usr/bin/ with a symlink to /bin/ populateUsrBin = false; + // whether to set common cross-compilation environment variables + ccommon = true; + // build system helper, see section "Build system helpers" exec = generic { chdir = false; cross = ` export HAKUREI_ARCH='`+arch+`' export HAKUREI_SYSROOT='`+prefix+`/`+arch+`' - - export PKG_CONFIG_SYSROOT_DIR='`+prefix+`/`+arch+`' - export PKG_CONFIG_LIBDIR='`+prefix+`/`+arch+prefix+`/lib/pkgconfig:`+ - prefix+`/`+arch+``+prefix+`/share/pkgconfig' `; build = ` NAME=make`; @@ -399,10 +398,6 @@ scripts too specific to fit into any other [Helper] implementation. cross = ` export HAKUREI_ARCH='`+arch+`' export HAKUREI_SYSROOT='`+prefix+`/`+arch+`' - - export PKG_CONFIG_SYSROOT_DIR='`+prefix+`/`+arch+`' - export PKG_CONFIG_LIBDIR='`+prefix+`/`+arch+prefix+`/lib/pkgconfig:`+ - prefix+`/`+arch+``+prefix+`/share/pkgconfig' `; // runs first, or after cross if cross-compiling -- cgit v1.3.1