c++ includes not getting searched for correctly?
Anthony Foiani
anthony.foiani@gmail.com
Mon Oct 4 18:14:00 GMT 2010
On Fri, Oct 1, 2010 at 2:47 PM, Anthony Foiani <anthony.foiani@gmail.com> wrote:
> The upshot is that the final cross-compiler looks in the wrong place
> for c++ headers; it ends up looking in
>
> TARGET/lib/gcc/TARGET/4.5.1/include/
> TARGET/lib/gcc/TARGET/4.5.1/include-fixed/
> TARGET/TARGET/sys-root/usr/include/
>
> When it should be looking in:
>
> TARGET/TARGET/sys-root/usr/include/c++/4.5.1/
>
> It is the C++ compiler that is invoked, not the C compiler.
>
> Any ideas would be very welcome.
I investigated further, and it seems that the cross g++ isn't really
looking at the sysroot at all. I can compile c++ programs if I add
two symlinks:
$ ls -al ~/x-tools/powerpc-e500v2-linux-gnuspe/powerpc-e500v2-linux-gnuspe
total 20
drwxr-xr-x. 5 tony tony 4096 2010-10-03 13:39 .
dr-xr-xr-x. 8 tony tony 4096 2010-10-02 18:34 ..
dr-xr-xr-x. 2 tony tony 4096 2010-10-02 18:33 bin
dr-xr-xr-x. 3 tony tony 4096 2010-10-02 18:14 debug-root
lrwxrwxrwx. 1 tony tony 20 2010-10-03 13:39 include -> sys-root/usr/include
lrwxrwxrwx. 1 tony tony 12 2010-10-03 13:39 lib -> sys-root/lib
dr-xr-xr-x. 6 tony tony 4096 2010-10-02 18:33 sys-root
Not at all sure how to fix this, though; I took a look at how gcc
handles include search paths, and my head exploded a little bit. :(
Thanks,
t.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list