[llvm-dev] [GSOC 2018] GNU Binutils replacement

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 30 01:32:02 PDT 2018


On 29 Mar 2018, at 22:27, Eric Christopher via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> On Mon, Mar 19, 2018 at 1:52 PM Jake Ehrlich via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> > Is there a typo somewhere in there?  "llvm-as" and "GNU as" are completely unrelated.
> 
>> It wasn't a typo unfortunately but I should have said llvm-mc. I just googled "llvm as" saw "llvm-as" and thought "oh that must be the GNU CLI compatible version of llvm-mc". That's what making assumptions gets me. I suppose a symlink to llvm-mc or something might be better. Clang already supports assembly in a command line compatible way with gcc as well. I don't really know what the proper thing to do there would be and it would depend on how different projects are using those tools.
> 
> 
> We haven't had a good reason to really want a command line assembler since we pretty much just suggest using "clang" as that driver - and honestly it's what people should do with gcc as well. :)

I had a look at implementing a gas-compatible wrapper a couple of years ago when we started seriously looking at removing GPL’d code from FreeBSD.  I decided it wasn’t worth if for a few reasons:

 - cc is required by POSIX, but as is not, so we don’t need it for conformance.
 - gas has a *huge* number of command-line options so complete compatibility is very difficult
 - Most things that care about the more complex options don’t actually use gas, they use nasm or yasm

I don’t wish to discourage anyone from providing a drop-in replacement for gas (in particular, teaching clang -cc1as to recognise all of the gas options) - there’s always going to be a long tail of things that will want to use all of the weird things that their old toolchain supported.

David



More information about the llvm-dev mailing list