<div dir="ltr">Hi Patrick,<div><br></div><div>This is a common case when cross compiling, so clang knows how to use a gcc-toolchain installation: you just have to pass it the "--sysroot=..." and "--toolchain=..." arguments, and it will get the header files and linker / assembler for your target --- assuming your gcc-toolchain has a standard layout.</div><div><br></div><div>Kind regards,</div><div>Arnaud</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 4:22 PM, Patrick Boettcher via cfe-users <span dir="ltr"><<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi list,<br>
<br>
I'm using clang to cross-compile for a sparc-target.<br>
<br>
Except for the compiler I (seem to) rely entirely on gcc-tools (ld,<br>
asm). I doing this by passing the -B<br>
<path-to-gcc-toolchain> - flag to clang.<br>
<br>
I'm now facing an issue where I would like to have clang use the<br>
c++-system-includes of my gcc-installation.<br>
<br>
When I dump the considered include-dirs with<br>
<br>
  echo | sparc-elf-gcc -nostdlib -xc++ -E -Wp,-v - -fsyntax-only<br>
<br>
I'm getting a list of all the paths I'm looking for. Doing the same<br>
with clang (even with the -B-flag) having the -target-flag set, the<br>
list is empty.<br>
<br>
What is the proper way to let clang now where to find the<br>
system-includes in cross-compilation scenarios?<br>
<br>
I'm now using a script which generates -isystem-arguments which based<br>
on a list generated with a call as shown above.<br>
<br>
Should the list be derived from the -B-argument?<br>
<br>
best regards,<br>
--<br>
Patrick.<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div><br></div>