[cfe-users] C/C++ system include dirs when cross-compiling

Patrick Boettcher via cfe-users cfe-users at lists.llvm.org
Fri Mar 25 00:02:03 PDT 2016


On Thu, 24 Mar 2016 23:08:40 +0100
Patrick Boettcher via cfe-users <cfe-users at lists.llvm.org> wrote:

> Hi Arnaud,
> 
> On Thu, 24 Mar 2016 16:48:30 +0100
> Arnaud Allard de Grandmaison <arnaud.adegm at gmail.com> wrote:
> 
> > Hi Patrick,
> > 
> > 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.  
> 
> It wasn't that straight-forward for me to find information
> about this "common case" as you call it ;-) .
> 
> I initially had problems finding the -B option of clang (it is
> not listed in --help nor in --help-hidden).
> 
> The --gcc-toolchain-argument does not work with the clang I built:
> 
> ../../upstream/build/bin/clang++ --gcc-toolchain
> clang-3.8: error: unsupported option '--gcc-toolchain'
> clang-3.8: error: no input files

Stupid me, it is of course --gcc-toolchain=/path/to , I tried
--gcc-toolchain /path/to - which gave me the same error.

It accepts the argument, but it doesn't seem to use anything of it. I
will dig into it.

--
Patrick.



More information about the cfe-users mailing list