gcc: Fix manpage symlinks when architecture tuples are prefixed to the file name #92704
Motivation for this change
In some cases, building
This pull request should fix the way the symlink is created to handle the normal situation without any arch tuples prefixing the file, with arch prefixes, and, since I wasn't sure about any other corner cases, it also handles if there are both a prefixed and non-prefixed manpage or if there aren't any manpages.
The text was updated successfully, but these errors were encountered:
In some cases, such as when building cross compilers, the binaries and manpages contain the target architecture tuple, such as `i686-w64-mingw32-g++.1`. Ensure the symlink created to save space with the duplicated manpage (`g++.1 -> gcc.1`) properly handles such cases and generates symlinks such as `i686-w64-mingw32-g++.1 -> i686-w64-mingw32-gcc.1`. Previously in such cases, a broken `gcc.1` link would be created instead.