On 3/1/23 04:35, Khem Raj via Gcc-patches wrote:
Currently, if the gcc toolchain is relocated and installed from shared state 
cache, then you try and compile
preprocessed source (.i or .ii files), the compiler will try and access the 
builtin sysroot location
rather than the --sysroot option specified on the commandline. If access to 
that directory is
permission denied (unreadable), gcc will error.

This happens when ccache is in use due to the fact it uses preprocessed source 
files.

The fix below adds %I to the cpp-output spec macro so the default substitutions 
for -iprefix,
-isystem, -isysroot happen and the correct sysroot is used.
Given this doesn't appear to fix a regression and is pretty narrow in terms of affected users, I'm going to defer to gcc-14.

I think this is probably OK once development re-opens.

jeff

Reply via email to