However, this doesn’t help with the case where gcc-toolchain is installed in a profile. Libcpp does have a file canonicalization method, enabled by default (see --enable-canonical-system-headers.) Specifically, in files.c, ‘find_file_in_dir’ does: /* We try to canonicalize system headers. */ if (CPP_OPTION (pfile, canonical_system_headers) && file->dir->sysp) { char * canonical_path = maybe_shorter_path (path); Unfortunately, ‘maybe_shorter_path’ (which calls ‘lrealpath’ from libiberty) doesn’t seem to be called for libc headers, presumably because it’s too late: file->dir->sysp is false. In summary, so far I can only think of half a solution, which is the ‘gcc-toolchain’ fix above. Thoughts? Ludo’.