diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2024-02-13 13:20:00 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2024-02-13 13:41:21 -0500 |
commit | 548e73667bcd5682ffb9eea0d78463a5f74edb7c (patch) | |
tree | 86455aac53e7ac75b6d7c225eeb549cd0f338dcc /x11-terms | |
parent | sys-apps/shadow: set QA_CONFIG_IMPL_DECL_SKIP for musl (diff) | |
download | gentoo-548e73667bcd5682ffb9eea0d78463a5f74edb7c.tar.gz gentoo-548e73667bcd5682ffb9eea0d78463a5f74edb7c.tar.bz2 gentoo-548e73667bcd5682ffb9eea0d78463a5f74edb7c.zip |
x11-terms/kitty: workaround link failure with Go + gcc + -g(gdb)3
Not interested in pursuing a potential Go bug, so just do a
workaround. May recheck now and then to see if it's not longer
needed with toolchain updates.
If this is a widespread issue, it may need visiting in go-env's
go-env_set_compile_environment instead though.
Not an issue for the non-CGO_CFLAGS bits, so can keep -g3 elsewhere.
Closes: https://bugs.gentoo.org/924436
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-terms')
-rw-r--r-- | x11-terms/kitty/kitty-0.32.1.ebuild | 12 | ||||
-rw-r--r-- | x11-terms/kitty/kitty-0.32.2.ebuild | 12 | ||||
-rw-r--r-- | x11-terms/kitty/kitty-9999.ebuild | 12 |
3 files changed, 33 insertions, 3 deletions
diff --git a/x11-terms/kitty/kitty-0.32.1.ebuild b/x11-terms/kitty/kitty-0.32.1.ebuild index ce3ee5eb6d93..de8a2affadb5 100644 --- a/x11-terms/kitty/kitty-0.32.1.ebuild +++ b/x11-terms/kitty/kitty-0.32.1.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) -inherit edo go-env optfeature multiprocessing +inherit edo flag-o-matic go-env optfeature multiprocessing inherit python-single-r1 toolchain-funcs xdg if [[ ${PV} == 9999 ]]; then @@ -132,6 +132,16 @@ src_compile() { local -x GOFLAGS="-p=$(makeopts_jobs) -v -x" use ppc64 && [[ $(tc-endian) == big ]] || GOFLAGS+=" -buildmode=pie" + # workaround link errors with Go + gcc + -g3 (bug #924436), + # retry now and then to see if can be dropped + tc-is-gcc && + CGO_CFLAGS=$( + CFLAGS=${CGO_CFLAGS} + replace-flags -g3 -g + replace-flags -ggdb3 -ggdb + printf %s "${CFLAGS}" + ) + local conf=( --disable-link-time-optimization --ignore-compiler-warnings diff --git a/x11-terms/kitty/kitty-0.32.2.ebuild b/x11-terms/kitty/kitty-0.32.2.ebuild index ad738d565f30..5099295c3d2c 100644 --- a/x11-terms/kitty/kitty-0.32.2.ebuild +++ b/x11-terms/kitty/kitty-0.32.2.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) -inherit edo go-env optfeature multiprocessing +inherit edo flag-o-matic go-env optfeature multiprocessing inherit python-single-r1 toolchain-funcs xdg if [[ ${PV} == 9999 ]]; then @@ -132,6 +132,16 @@ src_compile() { local -x GOFLAGS="-p=$(makeopts_jobs) -v -x" use ppc64 && [[ $(tc-endian) == big ]] || GOFLAGS+=" -buildmode=pie" + # workaround link errors with Go + gcc + -g3 (bug #924436), + # retry now and then to see if can be dropped + tc-is-gcc && + CGO_CFLAGS=$( + CFLAGS=${CGO_CFLAGS} + replace-flags -g3 -g + replace-flags -ggdb3 -ggdb + printf %s "${CFLAGS}" + ) + local conf=( --disable-link-time-optimization --ignore-compiler-warnings diff --git a/x11-terms/kitty/kitty-9999.ebuild b/x11-terms/kitty/kitty-9999.ebuild index ad738d565f30..5099295c3d2c 100644 --- a/x11-terms/kitty/kitty-9999.ebuild +++ b/x11-terms/kitty/kitty-9999.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) -inherit edo go-env optfeature multiprocessing +inherit edo flag-o-matic go-env optfeature multiprocessing inherit python-single-r1 toolchain-funcs xdg if [[ ${PV} == 9999 ]]; then @@ -132,6 +132,16 @@ src_compile() { local -x GOFLAGS="-p=$(makeopts_jobs) -v -x" use ppc64 && [[ $(tc-endian) == big ]] || GOFLAGS+=" -buildmode=pie" + # workaround link errors with Go + gcc + -g3 (bug #924436), + # retry now and then to see if can be dropped + tc-is-gcc && + CGO_CFLAGS=$( + CFLAGS=${CGO_CFLAGS} + replace-flags -g3 -g + replace-flags -ggdb3 -ggdb + printf %s "${CFLAGS}" + ) + local conf=( --disable-link-time-optimization --ignore-compiler-warnings |