Search notes:

gcc -print-prog-name

gcc -print-prog-name=cc1 prints the path to the installation of cc1.
#!/bin/sh

for prog in cc1 cc1plus collect2 f771 jc1 jvgenmain; do
    printf "%-10s : %s\n" $prog $(gcc -print-prog-name=$prog)
done
Github repository about-gcc, path: /options/print/prog-name/print-prog-names.sh

See also

gcc --print-search-dirs
GCC options

Index