From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 EC83D15823F for ; Sun, 19 Nov 2023 12:35:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9AC232BC050; Sun, 19 Nov 2023 12:34:33 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3BE702BC04D for ; Sun, 19 Nov 2023 12:34:33 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: Thilo Fromm , James Le Cuirot Subject: [gentoo-dev] [PATCH 2/4] eclass/go-module.eclass: export compile env in src_unpack Date: Sun, 19 Nov 2023 12:30:45 +0000 Message-ID: <20231119123410.17748-3-chewi@gentoo.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119123410.17748-1-chewi@gentoo.org> References: <20231119123410.17748-1-chewi@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 127996a0-7e89-4d0b-9557-99eb70e50612 X-Archives-Hash: 6c446799c52365da8b694fb0f1d1da5f From: Thilo Fromm This change calls go-env_set_compile_environment in go-module's src_unpack to set up a sane compile environment early in the go build process. This un-breaks cross compiling of all golang ebuilds that inherit go-module. Signed-off-by: Thilo Fromm Signed-off-by: James Le Cuirot --- eclass/go-module.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass index 6c58d7f26f07..701d36e012e2 100644 --- a/eclass/go-module.eclass +++ b/eclass/go-module.eclass @@ -68,7 +68,7 @@ esac if [[ -z ${_GO_MODULE_ECLASS} ]]; then _GO_MODULE_ECLASS=1 -inherit multiprocessing toolchain-funcs +inherit multiprocessing toolchain-funcs go-env if [[ ! ${GO_OPTIONAL} ]]; then BDEPEND=">=dev-lang/go-1.18" @@ -363,6 +363,7 @@ go-module_setup_proxy() { # local go proxy. This mode is deprecated. # 2. Otherwise, if EGO_VENDOR is set, bail out, as this functionality was removed. # 3. Otherwise, call 'ego mod verify' and then do a normal unpack. +# Set compile env via go-env. go-module_src_unpack() { if use amd64 || use arm || use arm64 || ( use ppc64 && [[ $(tc-endian) == "little" ]] ) || use s390 || use x86; then @@ -386,6 +387,8 @@ go-module_src_unpack() { ${nf} ego mod verify fi fi + + go-env_set_compile_environment } # @FUNCTION: _go-module_src_unpack_gosum -- 2.42.1