https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125956
--- Comment #26 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:f81f033bdfda4550419805bbb1eef770c2af7b23 commit r17-2457-gf81f033bdfda4550419805bbb1eef770c2af7b23 Author: Jonathan Wakely <[email protected]> Date: Wed Jun 24 21:50:24 2026 +0100 contrib: Fix exit status of relpath.sh for invalid args [PR125956] The relpath.sh script always writes its usage message to stdout and exits with zero status, even for invalid arguments. This caused a problem for libstdc++-v3/src/c++23/Makefile which assumed that relpath.sh won't exit successfully on error, via: relpath=$(relpath.sh ...) && sed 's,@MODPATH@,$$relpath,' ... Because relpath.sh exits successfully for invalid args, the sed command still ran even when relpath.sh was invoked incorrectly. The libstdc++ Makefile has been changed to work around this, but relpath.sh should still have an idiomatic exit status. contrib/ChangeLog: PR libstdc++/125956 * relpath.sh: For invalid arguments write to stderr and exit with non-zero status.
