<div dir="ltr">I'll provide a pull request. Since MSP430 code is always cross-compiled we can assume that 'gcc' is always wrong. The only names I've ever seen used are 'msp430-gcc' (nearly all I've seen) and 'msp430-elf-gcc' (TI's prebuilt toolchain). So, for now, we can avoid the "complicated logic" that clang uses without hardcoding it too much.<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 6, 2017 at 2:29 AM, Nicholas Wilson <span dir="ltr"><<a href="mailto:iamthewilsonator@hotmail.com" target="_blank">iamthewilsonator@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
If you want to hack it straight away 
<div><br>
</div>
<div>make changes to</div>
<div><a href="https://github.com/ldc-developers/ldc/blob/master/driver/toobj.cpp#L136" target="_blank">https://github.com/ldc-<wbr>developers/ldc/blob/master/<wbr>driver/toobj.cpp#L136</a></div>
<div>in particular change the getGcc in line 186</div>
<div><span class="m_-4149011694844578206pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)"><span class="m_-4149011694844578206pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">int</span><span style="color:rgb(36,41,46)">
 R = </span>executeToolAndWait</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)">(</span><span class="m_-4149011694844578206pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)">getGcc</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)">(),
 args, global.</span><span class="m_-4149011694844578206pl-smi" style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)">params</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)">.</span><span class="m_-4149011694844578206pl-smi" style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)">verbose</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)">);</span></div>
<div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,251,221)"><br>
</span></div>
<div><font color="#24292e"><span style="white-space:pre-wrap;background-color:rgb(255,251,221)">to wherever you assembler is located. </span></font></div>
<div><font color="#24292e"><span style="white-space:pre-wrap;background-color:rgb(255,251,221)">You may have to change the arguments passed to the assembler as well.</span></font></div><div><div class="h5">
<div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="white-space:pre-wrap;background-color:rgb(255,251,221)"><br>
</span></font>
<div>
<blockquote type="cite">
<div>On 6 Jul 2017, at 9:24 am, Luís Marques <<a href="mailto:luis@luismarques.eu" target="_blank">luis@luismarques.eu</a>> wrote:</div>
<br class="m_-4149011694844578206Apple-interchange-newline">
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Thu, Jul 6, 2017 at 2:19 AM, Tim Northover <span dir="ltr">
<<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 5 July 2017 at 17:51, Luís Marques via llvm-dev<br>
<span class="m_-4149011694844578206gmail-"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> Cool. When I did that on macOS, LDC generated a lot of complaints, possibly<br>
> because it is assuming mach-o files. I tried changing from -mtriple=msp430<br>
> to -mtriple=msp430-unknown-elf, to no avail. E.g.:<br>
<br>
</span>Clang has a bunch of complicated logic to find the correct assembler<br>
if it's installed (in this case I'd expect "msp430-unknown-elf-as").<br>
It's quite possible LDC doesn't have this since its main targets use<br>
the integrated-assembler. Your errors certainly look consistent with<br>
the macOS system "as" being called on ELF MSP430 output.<br>
</blockquote>
<div><br>
</div>
<div>Yup, it's using /usr/bin/gcc as the assembler driver. </div>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>

</blockquote></div><br></div></div>