https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119266
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Sam James from comment #0) > $ A=/usr/lib/gcc/x86_64-pc-linux-gnu/15/ > $ > B=/usr/lib/gcc/x86_64-pc-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc > $ contrib/relpath.sh $A $B > ../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc That looks right to me given those A and B. (In reply to Sam James from comment #5) > Unfortunately, realpath isn't in POSIX shell, but: > ``` > $ realpath --relative-to=$A > /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc > include/g++-v15/bits/std.cc That's a very different B from the one above; with these arguments relpath.sh gives the same answer. This doesn't seem like a relpath problem.