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 38CA315800F for ; Fri, 17 Feb 2023 03:20:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 551AAE07E1; Fri, 17 Feb 2023 03:20:26 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 3B6BCE07E1 for ; Fri, 17 Feb 2023 03:20:26 +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 4401F335DB3 for ; Fri, 17 Feb 2023 03:20:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9D8D38A9 for ; Fri, 17 Feb 2023 03:20:23 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1676604013.b2ef3711590017fec705bbb8a9f00268781128a1.williamh@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/go-module.eclass X-VCS-Directories: eclass/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: b2ef3711590017fec705bbb8a9f00268781128a1 X-VCS-Branch: master Date: Fri, 17 Feb 2023 03:20:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 761d7aa3-6c21-43f3-b355-8ae823e746d6 X-Archives-Hash: 89a1701a2552a1d9b23981502752c92c commit: b2ef3711590017fec705bbb8a9f00268781128a1 Author: William Hubbs gentoo org> AuthorDate: Fri Feb 17 03:13:31 2023 +0000 Commit: William Hubbs gentoo org> CommitDate: Fri Feb 17 03:20:13 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2ef3711 go-module.eclass: fix -buildmode=pie, support makeopts Closes: https://bugs.gentoo.org/893316 Signed-off-by: William Hubbs gentoo.org> eclass/go-module.eclass | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass index 08e9f267d0af..bae5d2a49894 100644 --- a/eclass/go-module.eclass +++ b/eclass/go-module.eclass @@ -65,6 +65,8 @@ case ${EAPI} in *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac +inherit multiprocessing + if [[ -z ${_GO_MODULE} ]]; then _GO_MODULE=1 @@ -100,7 +102,7 @@ export GOMODCACHE="${WORKDIR}/go-mod" # -modcacherw makes the build cache read/write # -v prints the names of packages as they are compiled # -x prints commands as they are executed -export GOFLAGS="-buildmode=pie -buildvcs=false -modcacherw -v -x" +export GOFLAGS="-buildvcs=false -modcacherw -v -x" # Do not complain about CFLAGS etc since go projects do not use them. QA_FLAGS_IGNORED='.*' @@ -349,6 +351,11 @@ go-module_setup_proxy() { # - Otherwise, if EGO_VENDOR is set, bail out. # - Otherwise do a normal unpack. go-module_src_unpack() { + if use amd64 || use arm || use arm64 || + ( use ppc64 && ! use big-endian ) || use s390 || use x86; then + GOFLAGS="-buildmode=pie ${GOFLAGS}" + fi + GOFLAGS="${GOFLAGS} -p $(makeopts_jobs)" if [[ "${#EGO_SUM[@]}" -gt 0 ]]; then eqawarn "This ebuild uses EGO_SUM which is deprecated" eqawarn "Please migrate to a dependency tarball"