Hello, Andreas.
> It seems that the generated ASM code cannot be assembled with GCC (wrong
output format I guess).
Yes, it seems, that intel-style assembler is emitted.
> Maybe this fails because it calls the MingW gcc.exe and not llvm-gcc.exe?
No. LLVM autodetects platform you're running tools on. So, the problem
actually is that you're trying to "mix" binaries built with
microsoft
tools with gcc. The first will force LLVM tools to emit intel-style
assembler (in fact, masm-dialect), but second will assume, that you're
providing AT&T style assembler on input.
Possible solutions:
1. Either build LLVM with gcc on mingw32 platform
2. Select assembler flavour "by hands" (look into llc --help to find,
how to do this)
3. Implement necessary functionality in llvm-ld (calling microsoft
tools, if intel-style assembler is emitted).
> However, is the name "a.out.s" a bug?
No.
> Is it planed to include binary writers?
Maybe. Patches are welcome :) In fact, there are MachO and ELF writers.
Both misses many important things.
> (So that the step to go through an external assembler wouldn't be
necessary.)
This isn't totally right: consider you have the source with inline
assembler.
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.