commit: 15fbfc075d699e498d73701b6f2a3f62d7dcabba Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Fri Apr 19 07:32:12 2019 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Fri Apr 19 07:35:38 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15fbfc07
sys-libs/glibc: disable c++ detection for cross-case, bug #683074 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=561b0bec4448f0302cb4915bf67c919bde4a1c57 in unstream glibc repo added optional dependency on CXX compiler. Unfortunately ./configure tries hard to pass some g++ as CXX: either ${CTARGET}-g++ (ok) or ${CBUILD}+g++ (bad). During toolchain bootstrap ${CTARGET}-g++ does not yet exist as we only have stage1-gcc without c++ (or libc) support. To restore toolchain bootstrap we force-disable c++ detection by setting cache variable: libc_cv_cxx_link_ok=no c++ is force disables only for cross-compilation case (CHOST != CTARGET). Cross-building case (CHOST = CTRAGET) is unchanged as we should already have c++ capable toolchain by then. Reported-by: hanetzer <AT> startmail.com Reported-by: rhn Closes: https://bugs.gentoo.org/683074 Package-Manager: Portage-2.3.63, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> sys-libs/glibc/glibc-2.29-r2.ebuild | 11 +++++++++++ sys-libs/glibc/glibc-9999.ebuild | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/sys-libs/glibc/glibc-2.29-r2.ebuild b/sys-libs/glibc/glibc-2.29-r2.ebuild index 093ffc207eb..8f920eb85ac 100644 --- a/sys-libs/glibc/glibc-2.29-r2.ebuild +++ b/sys-libs/glibc/glibc-2.29-r2.ebuild @@ -799,6 +799,17 @@ glibc_do_configure() { # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" echo diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 142153734f9..b01dc823635 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -800,6 +800,17 @@ glibc_do_configure() { # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" echo
