[llvm-dev] MSP430 code generation from LLVM IR

Nicholas Wilson via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 5 18:29:27 PDT 2017

If you want to hack it straight away

make changes to
in particular change the getGcc in line 186
int R = executeToolAndWait(getGcc(), args, global.params.verbose);

to wherever you assembler is located.
You may have to change the arguments passed to the assembler as well.

On 6 Jul 2017, at 9:24 am, Luís Marques <luis at luismarques.eu<mailto:luis at luismarques.eu>> wrote:

On Thu, Jul 6, 2017 at 2:19 AM, Tim Northover <t.p.northover at gmail.com<mailto:t.p.northover at gmail.com>> wrote:
On 5 July 2017 at 17:51, Luís Marques via llvm-dev
<llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
> Cool. When I did that on macOS, LDC generated a lot of complaints, possibly
> because it is assuming mach-o files. I tried changing from -mtriple=msp430
> to -mtriple=msp430-unknown-elf, to no avail. E.g.:

Clang has a bunch of complicated logic to find the correct assembler
if it's installed (in this case I'd expect "msp430-unknown-elf-as").
It's quite possible LDC doesn't have this since its main targets use
the integrated-assembler. Your errors certainly look consistent with
the macOS system "as" being called on ELF MSP430 output.

Yup, it's using /usr/bin/gcc as the assembler driver.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170706/a8e4dc53/attachment.html>

More information about the llvm-dev mailing list