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

2016-04-04 Thread Patrick Boettcher via cfe-users
On Thu, 31 Mar 2016 13:56:48 -0400 Jeffrey Walton wrote: > >> We were working around the broken C++ header includes by > >> specifically calling them out with -I. See the comment "Fix C++ > >> header paths for Ubuntu" at > >> https://github.com/weidai11/cryptopp/blob/master/setenv-embedded.sh#L96

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

2016-03-31 Thread Jeffrey Walton via cfe-users
>> We were working around the broken C++ header includes by specifically >> calling them out with -I. See the comment "Fix C++ header paths for >> Ubuntu" at >> https://github.com/weidai11/cryptopp/blob/master/setenv-embedded.sh#L96. > > That's what I did as well to work around. > >> ARM's "GCC ARM

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

2016-03-31 Thread Patrick Boettcher via cfe-users
On Thu, 31 Mar 2016 12:18:41 -0400 Jeffrey Walton wrote: > > TARGET=aarch64-elf \ > > GCC_ROOT=~/Downloads/gcc-linaro-5.3-2016.02-x86_64_aarch64-elf \ > > ~/devel/upstream/build/bin/clang++ \ > > -v \ > > --target=$TARGET \ > > --gcc-toolchain=$GCC_R

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

2016-03-31 Thread Jeffrey Walton via cfe-users
On Thu, Mar 31, 2016 at 11:50 AM, Patrick Boettcher via cfe-users wrote: > Hi, > > On Thu, 24 Mar 2016 16:48:30 +0100 > Arnaud Allard de Grandmaison wrote: > >> Hi Patrick, >> >> This is a common case when cross compiling, so clang knows how to use >> a gcc-toolchain installation: you just have t

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

2016-03-31 Thread Patrick Boettcher via cfe-users
Hi, On Thu, 24 Mar 2016 16:48:30 +0100 Arnaud Allard de Grandmaison 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

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

2016-03-25 Thread Patrick Boettcher via cfe-users
On Thu, 24 Mar 2016 23:08:40 +0100 Patrick Boettcher via cfe-users wrote: > Hi Arnaud, > > On Thu, 24 Mar 2016 16:48:30 +0100 > Arnaud Allard de Grandmaison wrote: > > > Hi Patrick, > > > > This is a common case when cross compiling, so clang knows how to > > use a gcc-toolchain installation:

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

2016-03-24 Thread Patrick Boettcher via cfe-users
Hi Arnaud, On Thu, 24 Mar 2016 16:48:30 +0100 Arnaud Allard de Grandmaison 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 g

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

2016-03-24 Thread Arnaud Allard de Grandmaison via cfe-users
There must be some misunderstanding there. The goal is to write: > clang++ -target sparc--netbsd -mcpu=... compile_flags --sysroot=... --toolchain=.. -o program.exe program.cpp And clang will cross-compile program.cpp for this specific sparc cpu using the includes from the sysroot, and link usin

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

2016-03-24 Thread Jeffrey Walton via cfe-users
On Thu, Mar 24, 2016 at 11:48 AM, Arnaud Allard de Grandmaison via cfe-users 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 ge

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

2016-03-24 Thread Arnaud Allard de Grandmaison via cfe-users
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

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

2016-03-24 Thread Patrick Boettcher via cfe-users
Hi list, I'm using clang to cross-compile for a sparc-target. Except for the compiler I (seem to) rely entirely on gcc-tools (ld, asm). I doing this by passing the -B - flag to clang. I'm now facing an issue where I would like to have clang use the c++-system-includes of my gcc-installation. W