public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/github-cli/
Date: Thu, 15 Aug 2024 21:18:45 +0000 (UTC)	[thread overview]
Message-ID: <1723756702.8b05c1c26ef96bb9324db626572f3c4a73e3178c.sam@gentoo> (raw)

commit:     8b05c1c26ef96bb9324db626572f3c4a73e3178c
Author:     Emanuele Torre <torreemanuele6 <AT> gmail <DOT> com>
AuthorDate: Wed Aug 14 05:36:34 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 21:18:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b05c1c2

dev-util/github-cli: fix build failure when -ggdb3 is in CFLAGS

After experiencing the bug described in https://bugs.gentoo.org/924496,
I was surprised to see  filter-flags "-ggdb3"  in the ebuilds for this
package.

I did some digging and found that go's goc does not use CFLAGS, LDFLAGS,
etc by default; it only uses the GOC_*FLAGS environment variables.
What causes goc to use CFLAGS if GOC_FLAGS is unset or empty is the
go-env_set_compile_environment function from the go-env eclass, that is
indirectly called by the go-module_live_vendor and go-module_src_unpack
functions from the go-module eclass that are being called from the
src_unpack of this ebuild.

So, calling  filter-lto ,  filter-flags "-ggdb3" , and  unset LDFLAGS
from src_compile before emake seems completely useless since those will
only filter regular  *FLAGS  environment variable, and not the
GOC_*FLAGS  environment variables initialised from the  *FLAGS
variables earlier on in src_unpack.

Moving those filter/unset commands to the start of  src_unpack  makes
them filter/unset *FLAGS variables before GOC_*FLAGS variables are set,
and actually fix the build problem encountered when CFLAGS contains
-ggdb3.

Bump copyright of touched ebuild files.

Bug: https://bugs.gentoo.org/847991
Closes: https://bugs.gentoo.org/924496
Signed-off-by: Emanuele Torre <torreemanuele6 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38140
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/github-cli/github-cli-2.27.0.ebuild | 15 ++++++++-------
 dev-util/github-cli/github-cli-2.31.0.ebuild | 15 ++++++++-------
 dev-util/github-cli/github-cli-2.32.1.ebuild | 15 ++++++++-------
 dev-util/github-cli/github-cli-2.33.0.ebuild | 15 ++++++++-------
 dev-util/github-cli/github-cli-2.42.0.ebuild | 13 +++++++------
 dev-util/github-cli/github-cli-2.52.0.ebuild | 13 +++++++------
 dev-util/github-cli/github-cli-9999.ebuild   | 15 ++++++++-------
 7 files changed, 54 insertions(+), 47 deletions(-)

diff --git a/dev-util/github-cli/github-cli-2.27.0.ebuild b/dev-util/github-cli/github-cli-2.27.0.ebuild
index 6ee5a5968dbd..49f74d520f92 100644
--- a/dev-util/github-cli/github-cli-2.27.0.ebuild
+++ b/dev-util/github-cli/github-cli-2.27.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,13 @@ RDEPEND=">=dev-vcs/git-1.7.3"
 RESTRICT="test"
 
 src_unpack() {
+	# Filter LTO flags to avoid build failures.
+	filter-lto
+	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
+	filter-flags "-ggdb3"
+	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	unset LDFLAGS
+
 	if [[ ${PV} == *9999 ]]; then
 		git-r3_src_unpack
 		go-module_live_vendor
@@ -35,12 +42,6 @@ src_unpack() {
 
 src_compile() {
 	[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
-	# Filter LTO flags to avoid build failures.
-	filter-lto
-	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
-	filter-flags "-ggdb3"
-	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	unset LDFLAGS
 	# Once we set up cross compiling, this line will need to be adjusted
 	# to compile for the target.
 	# Everything else in this function happens on the host.

diff --git a/dev-util/github-cli/github-cli-2.31.0.ebuild b/dev-util/github-cli/github-cli-2.31.0.ebuild
index 6ee5a5968dbd..49f74d520f92 100644
--- a/dev-util/github-cli/github-cli-2.31.0.ebuild
+++ b/dev-util/github-cli/github-cli-2.31.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,13 @@ RDEPEND=">=dev-vcs/git-1.7.3"
 RESTRICT="test"
 
 src_unpack() {
+	# Filter LTO flags to avoid build failures.
+	filter-lto
+	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
+	filter-flags "-ggdb3"
+	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	unset LDFLAGS
+
 	if [[ ${PV} == *9999 ]]; then
 		git-r3_src_unpack
 		go-module_live_vendor
@@ -35,12 +42,6 @@ src_unpack() {
 
 src_compile() {
 	[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
-	# Filter LTO flags to avoid build failures.
-	filter-lto
-	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
-	filter-flags "-ggdb3"
-	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	unset LDFLAGS
 	# Once we set up cross compiling, this line will need to be adjusted
 	# to compile for the target.
 	# Everything else in this function happens on the host.

diff --git a/dev-util/github-cli/github-cli-2.32.1.ebuild b/dev-util/github-cli/github-cli-2.32.1.ebuild
index 6ee5a5968dbd..49f74d520f92 100644
--- a/dev-util/github-cli/github-cli-2.32.1.ebuild
+++ b/dev-util/github-cli/github-cli-2.32.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,13 @@ RDEPEND=">=dev-vcs/git-1.7.3"
 RESTRICT="test"
 
 src_unpack() {
+	# Filter LTO flags to avoid build failures.
+	filter-lto
+	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
+	filter-flags "-ggdb3"
+	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	unset LDFLAGS
+
 	if [[ ${PV} == *9999 ]]; then
 		git-r3_src_unpack
 		go-module_live_vendor
@@ -35,12 +42,6 @@ src_unpack() {
 
 src_compile() {
 	[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
-	# Filter LTO flags to avoid build failures.
-	filter-lto
-	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
-	filter-flags "-ggdb3"
-	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	unset LDFLAGS
 	# Once we set up cross compiling, this line will need to be adjusted
 	# to compile for the target.
 	# Everything else in this function happens on the host.

diff --git a/dev-util/github-cli/github-cli-2.33.0.ebuild b/dev-util/github-cli/github-cli-2.33.0.ebuild
index 6ee5a5968dbd..49f74d520f92 100644
--- a/dev-util/github-cli/github-cli-2.33.0.ebuild
+++ b/dev-util/github-cli/github-cli-2.33.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,13 @@ RDEPEND=">=dev-vcs/git-1.7.3"
 RESTRICT="test"
 
 src_unpack() {
+	# Filter LTO flags to avoid build failures.
+	filter-lto
+	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
+	filter-flags "-ggdb3"
+	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	unset LDFLAGS
+
 	if [[ ${PV} == *9999 ]]; then
 		git-r3_src_unpack
 		go-module_live_vendor
@@ -35,12 +42,6 @@ src_unpack() {
 
 src_compile() {
 	[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
-	# Filter LTO flags to avoid build failures.
-	filter-lto
-	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
-	filter-flags "-ggdb3"
-	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	unset LDFLAGS
 	# Once we set up cross compiling, this line will need to be adjusted
 	# to compile for the target.
 	# Everything else in this function happens on the host.

diff --git a/dev-util/github-cli/github-cli-2.42.0.ebuild b/dev-util/github-cli/github-cli-2.42.0.ebuild
index 2d0c1da34ead..49f74d520f92 100644
--- a/dev-util/github-cli/github-cli-2.42.0.ebuild
+++ b/dev-util/github-cli/github-cli-2.42.0.ebuild
@@ -25,6 +25,13 @@ RDEPEND=">=dev-vcs/git-1.7.3"
 RESTRICT="test"
 
 src_unpack() {
+	# Filter LTO flags to avoid build failures.
+	filter-lto
+	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
+	filter-flags "-ggdb3"
+	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	unset LDFLAGS
+
 	if [[ ${PV} == *9999 ]]; then
 		git-r3_src_unpack
 		go-module_live_vendor
@@ -35,12 +42,6 @@ src_unpack() {
 
 src_compile() {
 	[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
-	# Filter LTO flags to avoid build failures.
-	filter-lto
-	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
-	filter-flags "-ggdb3"
-	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	unset LDFLAGS
 	# Once we set up cross compiling, this line will need to be adjusted
 	# to compile for the target.
 	# Everything else in this function happens on the host.

diff --git a/dev-util/github-cli/github-cli-2.52.0.ebuild b/dev-util/github-cli/github-cli-2.52.0.ebuild
index 2d0c1da34ead..49f74d520f92 100644
--- a/dev-util/github-cli/github-cli-2.52.0.ebuild
+++ b/dev-util/github-cli/github-cli-2.52.0.ebuild
@@ -25,6 +25,13 @@ RDEPEND=">=dev-vcs/git-1.7.3"
 RESTRICT="test"
 
 src_unpack() {
+	# Filter LTO flags to avoid build failures.
+	filter-lto
+	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
+	filter-flags "-ggdb3"
+	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	unset LDFLAGS
+
 	if [[ ${PV} == *9999 ]]; then
 		git-r3_src_unpack
 		go-module_live_vendor
@@ -35,12 +42,6 @@ src_unpack() {
 
 src_compile() {
 	[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
-	# Filter LTO flags to avoid build failures.
-	filter-lto
-	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
-	filter-flags "-ggdb3"
-	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	unset LDFLAGS
 	# Once we set up cross compiling, this line will need to be adjusted
 	# to compile for the target.
 	# Everything else in this function happens on the host.

diff --git a/dev-util/github-cli/github-cli-9999.ebuild b/dev-util/github-cli/github-cli-9999.ebuild
index 95a298653b46..a6d2c60b5a03 100644
--- a/dev-util/github-cli/github-cli-9999.ebuild
+++ b/dev-util/github-cli/github-cli-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,13 @@ RDEPEND=">=dev-vcs/git-1.7.3"
 RESTRICT="test"
 
 src_unpack() {
+	# Filter LTO flags to avoid build failures.
+	filter-lto
+	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
+	filter-flags "-ggdb3"
+	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	unset LDFLAGS
+
 	if [[ ${PV} == *9999 ]]; then
 		git-r3_src_unpack
 		go-module_live_vendor
@@ -35,12 +42,6 @@ src_unpack() {
 
 src_compile() {
 	[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
-	# Filter LTO flags to avoid build failures.
-	filter-lto
-	# Filter '-ggdb3' flag to avoid build failures. bugs.gentoo.org/847991
-	filter-flags "-ggdb3"
-	# Go LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	unset LDFLAGS
 	# Once we set up cross compiling, this line will need to be adjusted
 	# to compile for the target.
 	# Everything else in this function happens on the host.


             reply	other threads:[~2024-08-15 21:18 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15 21:18 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-15 21:18 [gentoo-commits] repo/gentoo:master commit in: dev-util/github-cli/ Sam James
2024-06-27 16:48 William Hubbs
2024-01-12 22:32 William Hubbs
2023-09-01 18:08 William Hubbs
2023-08-07 19:31 William Hubbs
2023-06-24  2:59 Sam James
2023-06-22 20:39 William Hubbs
2023-06-22 20:38 William Hubbs
2023-04-13 15:02 William Hubbs
2023-01-16 20:11 William Hubbs
2022-12-01 21:16 William Hubbs
2022-12-01 21:13 William Hubbs
2022-10-19 20:42 William Hubbs
2022-10-19 20:42 William Hubbs
2022-08-25  7:07 WANG Xuerui
2022-08-25  7:07 WANG Xuerui
2022-08-05 19:00 William Hubbs
2022-08-04 18:41 Arthur Zamarin
2022-08-04  6:27 Arthur Zamarin
2022-06-22 14:55 William Hubbs
2022-06-22 14:55 William Hubbs
2022-06-01  1:51 Sam James
2022-06-01  1:51 Sam James
2022-06-01  1:51 Sam James
2022-06-01  1:51 Sam James
2022-05-24 15:12 William Hubbs
2022-05-24 15:12 William Hubbs
2022-05-24 15:04 William Hubbs
2022-04-20  1:44 William Hubbs
2022-03-10  2:37 Yixun Lan
2022-02-22 15:25 William Hubbs
2022-02-22 15:10 William Hubbs
2022-01-01 18:05 William Hubbs
2021-08-26 16:09 William Hubbs
2021-08-26 16:07 William Hubbs
2021-08-10 21:02 William Hubbs
2021-08-10 21:02 William Hubbs
2021-05-25 11:12 Joonas Niilola
2021-04-16  6:04 William Hubbs
2021-04-02 17:29 William Hubbs
2021-03-14 17:58 William Hubbs
2021-02-24 19:22 William Hubbs
2021-01-29 16:40 William Hubbs
2021-01-29 16:37 William Hubbs
2021-01-29 15:54 William Hubbs
2020-12-23 17:03 William Hubbs
2020-09-17 14:12 William Hubbs
2020-07-26 17:52 William Hubbs
2020-06-12 21:14 William Hubbs
2020-06-07 18:00 William Hubbs
2020-05-31  4:18 Robin H. Johnson
2020-05-31  4:18 Robin H. Johnson
2020-05-31  4:18 Robin H. Johnson
2020-05-26 20:19 William Hubbs
2020-05-18 15:48 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1723756702.8b05c1c26ef96bb9324db626572f3c4a73e3178c.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox