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