#49001: Add support to provide a clang-based as wrapper ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by jeremyhu@…): Replying to [comment:18 howarth.at.macports@…]:
Replying to [comment:16 jeremyhu@…]:
Multiple things wrong with that statement.
1) cctools in OS X is only used to produce libmacho, not as.
{{{ That is not the behavior that I see on my 10.11 installation. The MacPorts cctools package shows a file...
-r-xr-xr-x 0 root admin 27948 Sep 29 14:37 ./opt/local/bin/as
which is producing the output...
% /opt/local/bin/as -v Apple Inc version cctools-870, GNU assembler version 1.38
Since Xcode 7 doesn't contain the legacy assembler, it must be coming from the MacPorts cctools package. }}}
The cctools project has many targets. In OS X, it is used to build libmacho (specifically /usr/lib/system/libmacho.dylib). OS X does not ship any version of as. In Xcode, it is used to build a version of libmacho for the tools as well as the GNU assembler and the as wrapper. And before you say "no" ... yes it does contain the legacy assembler. See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/as The as wrapper driver (http://opensource.apple.com/source/cctools/cctools-870/as/driver.c) has an option of using clang, and that option is now on in Xcode 7. Previously, it was only on for arm64. See: {{{ $ /opt/local/bin/as -arch arm64 --version clang version 3.8.0 (trunk 246024) Target: aarch64-apple-darwin15.0.0 Thread model: posix InstalledDir: /opt/local/libexec/llvm-3.8/bin }}} I'm not comfortable turning that on in cctools-870 for other architectures (and probably won't even when we update to newer cctools) because I don't have time to qualify that and mess around with the resulting dependency nightmare. We'd have to ensure that the 'port select'ed clang is new enough or modify driver.c to always use a specific version of clang. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:19> MacPorts <https://www.macports.org/> Ports system for OS X