<div dir="ltr">I've implemented something like this in <a href="https://github.com/rust-lang/compiler-rt/commits/rust-2014-02-17-do-not-delete">Rust's fork of compiler-rt</a>.  <br>Note that this can only be built via makefile, and, I suspect, my change does not do a good job at figuring out appropriate gcc flags for each platform, because I expect CFLAGS to be passed along from the parent project's build script.<br>
On the plus side, it seems to work on all platforms that Rust currently supports (Linux, Windows, OSX, FreeBSD, Android), so Rust (almost) doesn't need libgcc anymore.  ("almost" because there's still no replacement for stack unwinding routines).<br>
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 12:00 PM, Kev Kitchens <span dir="ltr"><<a href="mailto:kitchens.sync@me.com" target="_blank">kitchens.sync@me.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">I am attempting to port an operating system project to use Clang/LLVM instead of GCC, but I’m having issues with Compiler-RT. Right now, the OS is being cross-compiled on an x86_64 host targeting ARMv7a. I built the LLVM toolchain according to the instructions, though I limited the supported targets to arm, x86, and x86_64 to reduce compilation time. I’m finding that compilation proceeds fine but fails at the linking stage due to missing compiler builtins. When I examined the build log for the LLVM toolchain, I found that Compiler-RT was only being built for x86_64. So, as a stopgap, I’ve started linking against the existing cross-compiled libgcc to fill in the gaps. However, I’m trying to find out what I need to do to cross-compile Compiler-RT’s builtins library for ARMv7 so I can use it to replace libgcc. Any help here would be appreciated.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Kev Kitchens<u></u><u></u></p></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>