commit:     87c9c1899a56f388493ecbec3b45d175d99581f2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 13 17:20:22 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 13 17:20:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87c9c189

toolchain.eclass: hackily fixup libstdc++.modules.json

Bug: https://bugs.gentoo.org/948394
Bug: https://gcc.gnu.org/PR119266
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index e365269d1c18..b86da4cf9876 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2646,6 +2646,13 @@ toolchain_src_install() {
                fi
        fi
 
+       # Hack for C++ modules
+       if ! is_crosscompile; then
+               # PR19266 (bug #948394)
+               sed -e 
's,\.\./lib/gcc/${CHOST}/${GCCMAJOR}/include/,../../../../include/,' \
+                       
"${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/libstdc++.modules.json || die
+       fi
+
        # As gcc installs object files built against both ${CHOST} and 
${CTARGET}
        # ideally we will need to strip them using different tools:
        # Using ${CHOST} tools:

Reply via email to