From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1611488-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E2CCC158041 for <garchives@archives.gentoo.org>; Sat, 16 Mar 2024 04:44:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 44B3BE29E3; Sat, 16 Mar 2024 04:44:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D931CE29E4 for <gentoo-commits@lists.gentoo.org>; Sat, 16 Mar 2024 04:44:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 799C433B864 for <gentoo-commits@lists.gentoo.org>; Sat, 16 Mar 2024 04:44:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB7E67E7 for <gentoo-commits@lists.gentoo.org>; Sat, 16 Mar 2024 04:44:45 +0000 (UTC) From: "Sam James" <sam@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org> Message-ID: <1710561910.ced2f28eb782e273f62d34cd4c1aa08408869826.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/go-env.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ced2f28eb782e273f62d34cd4c1aa08408869826 X-VCS-Branch: master Date: Sat, 16 Mar 2024 04:44:45 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7b4b78d8-b8fb-4c06-8bdf-79adaa38e779 X-Archives-Hash: 99492563752339a0fe0c7e3080b4d8b9 commit: ced2f28eb782e273f62d34cd4c1aa08408869826 Author: Jeremi Piotrowski <jpiotrowski <AT> microsoft <DOT> com> AuthorDate: Tue Mar 12 09:35:48 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Mar 16 04:05:10 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ced2f28e 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 <AT> microsoft.com> Closes: https://github.com/gentoo/gentoo/pull/35721 Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/go-env.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)