Why can configure.compiler be cc or gcc?

Ryan Schmidt ryandesign at macports.org
Sun Nov 3 22:26:41 PST 2013


Why are “cc” and “gcc” valid values for configure.compiler?

We have a zillion portfiles that have special handling for clang compilers, usually implemented by checking [string match *clang* ${configure.compiler}]. But on Xcode 5, system cc and system gcc are both clang. So if a user chooses system cc or system gcc as their compiler, the compiler will be clang, but the string matches for clang will be false, which can lead to wrong behavior, such as:

https://trac.macports.org/ticket/41169



More information about the macports-dev mailing list