https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80782
Bug ID: 80782 Summary: Feature request: use the llvm/clang assembler on Mac Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: rjvbertin at gmail dot com Target Milestone: --- Created attachment 41367 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41367&action=edit wrapper to make "clang-as" callable as [g]as Apple provides an ageing GNU as fork as part of its cctools package: it's based on gas 1.38 and thus lacks support for CPU instruction sets added after that release. As a result, GCC generates code that fails to assemble when using optimisation for any CPU that has support for AVX or newer intrinsics. A pity and often annoying because the failure can happen only late during a build process. The easiest way around this would be to use the assembler that is actually used by clang. I'm attaching a wrapper script that I have been using to build boost, R and a few KF5 applications with full optimisation for an i7 CPU on Mac OS X 10.9.5 . (The resulting R binary is consistently a few percent faster than the same code built with clang 4.0) For some reason I fail to understand the GCC build process fails when using this wrapper: the tconfig.h header file is not generated. I have worked around that by providing a shunt in the wrapper that just hands off the command to the regular as executable, but there must be a more elegant way.