commit:     8b3988e62bd6da7c46f8f85eda280aa47e59d9f1
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat May 24 11:07:46 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat May 24 11:10:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b3988e6

toolchain.eclass: further improvements for bug 948394 (libstdc++.module.json 
path setting)

* Make sure that multilib subdirs get the same include path
* Do not fail if no json file is in the main directory (relevant
  for riscv multilib)

Bug: https://bugs.gentoo.org/948394
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 eclass/toolchain.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 2d903f992b17..bc10e7e62d1f 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2689,8 +2689,8 @@ toolchain_src_install() {
        # Hack for C++ modules
        if ! is_crosscompile && tc_version_is_at_least 15.0.1_pre20250316 
${PV}; then
                # PR19266 (bug #948394)
-               sed -i -e 
"s,\.\./lib/gcc/${CHOST}/${GCCMAJOR}/include/,include/," \
-                       
"${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/libstdc++.modules.json || die
+               find "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR} -name 
libstdc++.modules.json \
+                       -exec sed -i -e "s,\"source-path\": 
\".*gcc/${CHOST}/${GCCMAJOR}/include/,\"source-path\": \"include/," "{}" + || 
die
        fi
 
        # As gcc installs object files built against both ${CHOST} and 
${CTARGET}

Reply via email to