With regard to, "What is the difference between cpp and these other binaries (gcc and clang)? 'ls -la /usr/bin' clearly demonstrates none of them are symlinks."
/usr/bin/clang, /usr/bin/gcc and /usr/bin/cpp are hardlinks to the same binary. An ls -il of the three will show the same inode number, an equivalent link-count (e.g. 76) and a 256shasum hash for each with the same value.
$ ls -il /usr/bin/clang /usr/bin/gcc /usr/bin/cpp
1152921500312436371 -rwxr-xr-x 76 root wheel 167136 Dec 2 02:00
/usr/bin/clang
1152921500312436371 -rwxr-xr-x 76 root wheel 167136 Dec 2 02:00
/usr/bin/cpp
1152921500312436371 -rwxr-xr-x 76 root wheel 167136 Dec 2 02:00
/usr/bin/gcc
$ shasum -a 256 /usr/bin/clang /usr/bin/gcc /usr/bin/cpp
ca08407ee7e1a179d096fe27b8edef2a24cb33402f6338654e1b25589df9a4ba
/usr/bin/clang
ca08407ee7e1a179d096fe27b8edef2a24cb33402f6338654e1b25589df9a4ba
/usr/bin/gcc
ca08407ee7e1a179d096fe27b8edef2a24cb33402f6338654e1b25589df9a4ba
/usr/bin/cpp
Thus, when executing any of these, the name chosen for execution affords the option of allowing different behavior for the same file.
gcc/clangincorrectly. i think the answers found here could still be useful to future users.gcc -nostartfiles -Wl,-e,_mymain main.ccompiles and links (and can be successfully executed).