commit: eb9ab5af65cc7618278241fddb3729730b7507fc Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Feb 21 20:11:49 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Feb 21 20:12:53 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb9ab5af
toolchain.eclass: workaround broken disable configure logic for pie/bind-now Pass --enable-* if the USE flag is enabled, but don't pass --disable-* if it is disabled to workaround broken configure logic. I have a patch for trunk to fix this but backporting that will be a bit of a pain and not worth it IMO, so let's carry this for now and can conditionalise it on version later when fix lands upstream. Closes: https://bugs.gentoo.org/970413 Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/toolchain.eclass | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d9b5d3eb03a8..02cec10e2768 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1849,19 +1849,27 @@ toolchain_src_configure() { fi if in_iuse pie ; then - confgcc+=( $(use_enable pie default-pie) ) + # Workaround for broken configure logic (bug #970413) + if use pie ; then + confgcc+=( --enable-default-pie ) + fi if tc_version_is_at_least 14.1 ${PV} || tc_version_is_at_least 13.4.1_p20250814 ${PV} ; then - confgcc+=( $(use_enable pie host-pie) ) + # Workaround for broken configure logic (bug #970413) + if use pie ; then + confgcc+=( --enable-host-pie ) + fi fi fi if in_iuse default-znow && { tc_version_is_at_least 14.1 ${PV} || tc_version_is_at_least 13.4.1_p20250814 ${PV} ; } ; then # See https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=33ebb0dff9bb022f1e0709e0e73faabfc3df7931. # TODO: Add to LDFLAGS_FOR_TARGET? - confgcc+=( - $(use_enable default-znow host-bind-now) - ) + # + # Workaround for broken configure logic (bug #970413) + if use default-znow ; then + confgcc+=( --enable-host-bind-now ) + fi fi if in_iuse ssp ; then
