https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120974
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Nathaniel Shead <[email protected]>: https://gcc.gnu.org/g:ff6032ed4111be2f8a85c910fe899b33557447cb commit r15-10850-gff6032ed4111be2f8a85c910fe899b33557447cb Author: Nathaniel Shead <[email protected]> Date: Sun Feb 22 13:09:00 2026 +1100 driver: Escape special characters in '-fdeps-{file,target}' [PR120974] The driver uses the 'join' function to calculate the default output for the -fdeps-file and -fdeps-target parameters from the parameter given to -o (or the basename of the input file). But if the path given to -o has any whitespace in it this causes cc1plus to see arguments like "-o some file.o" "-fdeps-file=some" "file.ddi" which breaks. Fixed by adjusting the 'join' function to escape any special characters in the result. PR c++/120974 gcc/ChangeLog: * gcc.cc (join_spec_func): Escape special characters. Signed-off-by: Nathaniel Shead <[email protected]> Reviewed-by: Jason Merrill <[email protected]> (cherry picked from commit 64125642775fc485a58bda8df4401b667682254f)
