[MacPorts] #49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 -----------------------------------+-------------------------------- Reporter: howarth.at.macports@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: clang-3.7 -----------------------------------+-------------------------------- The current clang-3.7 subport is forcing a downgrade in the clang-based assembler used on Xcode 7.. depends_build port:cctools depends_skip_archcheck-append cctools ld64 subversion This seems like very undesirable behavior. -- Ticket URL: <https://trac.macports.org/ticket/49001> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Changes (by ryandesign@…): * cc: jeremyhu (removed) * owner: macports-tickets@… => jeremyhu@… Old description:
The current clang-3.7 subport is forcing a downgrade in the clang-based assembler used on Xcode 7..
depends_build port:cctools depends_skip_archcheck-append cctools ld64 subversion
This seems like very undesirable behavior.
New description: The current clang-3.7 subport is forcing a downgrade in the clang-based assembler used on Xcode 7.. {{{ depends_build port:cctools depends_skip_archcheck-append cctools ld64 subversion }}} This seems like very undesirable behavior. -- Comment: Please use WikiFormatting. Also note that the Cc field requires complete email addresses. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Changes (by jeremyhu@…): * status: new => closed * resolution: => invalid Comment: What makes you come to this conclusion? Actually, I think that Xcode 7.0's tools branched from llvm before the final 3.7. If you really want a newer assembler than 3.7, install 3.8. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by howarth.at.macports@…): Because when I tried 'sudo port -d -s install clang-3.7', the build dependencies include cctools. Inspection of the Portfile for llvm-3.7 shows that... depends_build port:cctools is defined for } elseif {${subport} eq "clang-${llvm_version}"} {. IMHO, that depends_build should be protected by a conditional that doesn't set it for Xcode 7 or later. Also, I see the same behavior in the llvm-3.8 Portfile for its dependencies required in the clang-3.8 subport. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by howarth.at.macports@…): Also, the clang-based assembler is not part of the upstream llvm.org builds. This feature seems to be an Apple specific replacement for the legacy GNU based assembler. It is really unclear where Apple would contribute that code into the llvm.org project anyway as it isn't really part of cfe needs requires to build against it. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by howarth.at.macports@…): Also, the crake-based build of llvm38 in fink only produces the expected llvm-as which is entirely different from the new clang-based assembler in Xcode 7 which reports back as... % as -v Apple LLVM version 7.0.0 (clang-700.0.72) Target: x86_64-apple-darwin15.0.0 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1as -triple x86_64-apple-macosx10.11.0 -filetype obj -main-file-name - -target-cpu core2 -fdebug-compilation-dir /Users/howarth -dwarf-debug- producer Apple LLVM version 7.0.0 (clang-700.0.72) -o a.out - -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by jeremyhu@…): cctools is installed to provide a fallback. The default (clang-based, integrated) assembler is provided by the llvm-3.7 port itself. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by howarth.at.macports@…): Replying to [comment:6 jeremyhu@…]:
cctools is installed to provide a fallback. The default (clang-based, integrated) assembler is provided by the llvm-3.7 port itself.
llvm-as isn't the same thing as /usr/bin/as under Xcode 7. The Xcode 7 clang based assembler is a drop in replacement for the legacy GNU assembler as it understands the command flags, etc. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by howarth.at.macports@…): My understanding is that the clang-based /usr/bin/as assembler in Xcode 7 is using the integrated assembler in clang rather than the llvm-as assembler while providing flag and syntax compatibility with the older GNU-assembler (so it is effectively a drop-in replacement). -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by jeremyhu@…): Yes, and maybe if I get some cycles, I'll setup alternatives to support that as well out of the clang port, but there is nothing *wrong* with the current configuration just because Xcode 7 was released. The software that is installed on your system didn't magically change over the past week. It's just that Xcode's versions are newer than our latest versions and added support for an as-wrapper around cfe instead of using GNU as. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by howarth.at.macports@…): I would argue that it creates unexpected behavior because the 'as' provided by cctools overrides the system 'as' from Xcode 7 for users on the command line outside of 'port'. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: clang-3.7 subport forces a downgrade in the assembler on Xcode 7 ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Comment (by jeremyhu@…): That is the *expected* behavior. We don't want our toolchains relying on the "system" / Xcode toolchain as that results in behavior that is dependent on outside factors (specifically, dependent on what version of Xcode is installed). We want builds to be as reproducible as possible. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: Add support to provide a clang-based as wrapper ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Changes (by jeremyhu@…): * status: closed => reopened * resolution: invalid => Comment: I'm all for *replacing* the cctools dependency with something else that will provide an alternative wrapper, like what is shipped in Xcode. But I don't have time for that now. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:12> MacPorts <https://www.macports.org/> Ports system for OS X
#49001: Add support to provide a clang-based as wrapper ------------------------------------+------------------------ Reporter: howarth.at.macports@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: clang-3.7 | ------------------------------------+------------------------ Changes (by jeremyhu@…): * status: reopened => new -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:13> MacPorts <https://www.macports.org/> Ports system for OS X
#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 | ------------------------------------+------------------------ Changes (by jeremyhu@…): * status: new => assigned -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:14> MacPorts <https://www.macports.org/> Ports system for OS X
#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 howarth.at.macports@…): It would be nice to find out what Apple intends to release as open source for the 10.11 cctools. The 'as' binary in Xcode 7.0.1 is actually quite small... ls -l /Library/Developer/CommandLineTools/usr/bin/as -rwxr-xr-x 1 root admin 31696 Sep 4 16:41 /Library/Developer/CommandLineTools/usr/bin/as which suggests that it might just be routing the assembly to the system clang compiler rather than performing the assembly itself. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:15> MacPorts <https://www.macports.org/> Ports system for OS X
#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@…): Multiple things wrong with that statement. 1) cctools in OS X is only used to produce libmacho, not as. 2) as (and most of the other toolchain bits) in /usr/bin are all xcrun stubs. They just redirect to the toolchain in the selected Xcode. 3) The cctools provided by Xcode 7 are of more interest to you. You just need to be patient. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:16> MacPorts <https://www.macports.org/> Ports system for OS X
#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@…):
which suggests that it might just be routing the assembly to the system clang compiler rather than performing the assembly itself.
Yes, exactly as I said above. If you feel like writing that yourself rather than waiting for the opensource drop, I'll certainly take your changes. However, I'm content on waiting for the OSS drop. -- Ticket URL: <https://trac.macports.org/ticket/49001#comment:17> MacPorts <https://www.macports.org/> Ports system for OS X
#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 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.
2) as (and most of the other toolchain bits) in /usr/bin are all xcrun stubs. They just redirect to the toolchain in the selected Xcode.
3) The cctools provided by Xcode 7 are of more interest to you.
You just need to be patient.
-- Ticket URL: <https://trac.macports.org/ticket/49001#comment:18> MacPorts <https://www.macports.org/> Ports system for OS X
#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
participants (1)
-
MacPorts