http://bugs.winehq.org/show_bug.cgi?id=29822
Bug #: 29822 Summary: winebuild should use Clang to assemble if Clang is used to compile Product: Wine Version: 1.4-rc2 Platform: x86 OS/Version: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: camillo.lugaresi+wine@gmail.com Classification: Unclassified
Trying to build Wine on Mac OS X 10.7 using Clang 3.0, winebuild generates several errors like "acledit.CPpFo1.s:83:Unknown pseudo-op: .cfi_startproc". The problem is that Clang supports CFI, but the version of GNU as shipped with OS X does not. When configure checks for CFI support, it uses Clang, and marks it as supported; this means that, later on, -fasynchronous-unwind-tables is passed to winegcc and then to winebuild, which generates the CFI lines and tries to assemble using /usr/bin/as, which rejects them.
The problem can be solved by using "clang -c" as an assembler instead of "as" when the C compiler in use is Clang and not GCC. I verified that this fix works using a quick and dirty patch to winebuild, but it needs to be properly conditionalized.