diff options
author | 2024-03-12 10:35:48 +0100 | |
---|---|---|
committer | 2024-03-16 04:05:10 +0000 | |
commit | ced2f28eb782e273f62d34cd4c1aa08408869826 (patch) | |
tree | 2151c9b7db80dcfb41a2445bb1f0ceb1f928cf36 | |
parent | profiles: clarify mask for Plasma 6 (diff) | |
download | gentoo-ced2f28eb782e273f62d34cd4c1aa08408869826.tar.gz gentoo-ced2f28eb782e273f62d34cd4c1aa08408869826.tar.bz2 gentoo-ced2f28eb782e273f62d34cd4c1aa08408869826.zip |
go-env.eclass: Export PKG_CONFIG
Go files may have cgo specifiers that use pkg-config to search for libraries to
link. An example of this is:
// #cgo pkg-config: gpgme
One case where this occurs is when building one of the go deps of
app-containers/podman-4.9.2.
If the ebuild doesn't export the correct PKG_CONFIG, this results in build
failures during cross-compilation. Go will find the host (CBUILD) pkg-config
instead of the CHOST version which performs the lookup in the correct sysroot.
Fix cross-compilation by exporting PKG_CONFIG in go-env_set_compile_environment.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Closes: https://github.com/gentoo/gentoo/pull/35721
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | eclass/go-env.eclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass index 1f950db06930..08cb6380e48a 100644 --- a/eclass/go-env.eclass +++ b/eclass/go-env.eclass @@ -27,7 +27,7 @@ inherit toolchain-funcs # (e.g. "emerge-aarch64-cross-linux-gnu foo" run on x86_64 will emerge "foo" for x86_64 # instead of aarch64) go-env_set_compile_environment() { - tc-export CC CXX + tc-export CC CXX PKG_CONFIG export GOARCH="$(go-env_goarch)" use arm && export GOARM=$(go-env_goarm) |