This page is a single technical article on a personal blog, dedicated to examining the gcc binary shipped at /usr/bin/gcc on macOS. Rather than a general resource site, it is a deep-dive investigation into one small but widely used piece of the Apple developer toolchain.
The author starts from a common observation: running gcc on a Mac produces clang-style errors, leading many to assume gcc is merely an alias. The article disproves that by showing gcc is a real binary, then walks through disassembled pseudocode to reveal how it inspects its own executable name and maps gcc, cc, llvm-gcc, c++, and llvm-g++ to clang or clang++ before invoking xcrun.
The content is aimed at macOS developers, reverse engineers, and toolchain enthusiasts who want to understand Apple’s compiler shims and the xcselect/xcrun mechanism. Readers without familiarity with disassembly or C tooling may find the code excerpts dense.
Use it as a reference when debugging build scripts that depend on gcc behavior, or as a case study in how Apple redirects legacy compiler names. It is best read alongside the actual binary and Apple’s developer documentation for context.
评论与评分
0还没有评论,来写下第一条评价吧。