A disassembly of macOS’s gcc shows that it is a wrapper executable, not a shell alias. The first wrapper calls a libxcselect function that routes through xcrun; gcc in the selected developer-tool directory is another wrapper that invokes xcrun to choose Clang or Clang++ according to the command name. Apple documentation likewise explains that wrappers in the system path route to the active Xcode tools. The actual tool can be checked with xcrun’s —find option and version output. The author’s suggestion that this structure exists because of SIP is speculation, not a verified design rationale.
Back to Tech
Tech
macOS gcc wrappers invoke Clang through xcrun
Check the active developer-tool path and actual version instead of assuming the command name identifies the compiler.