cross g++ sysroot and headers

Kai Ruottu kai.ruottu@wippies.com
Wed Mar 23 20:33:00 GMT 2016


23.3.2016, 19:44, Christer Solskogen kirjoitti:
> Hi!
>
> Is there a reason why ${TARGET}-g++ doesn't search for headers in 
> ${SYSROOT}/usr/include/c++/5.3.0`? It do look for them in in 
> $gcc_install_dir/${TARGET}/include/c++/5.3.0. Also 
> ${SYSROOT}/usr/include is being searched.
>
>

The 'gcc/cppdefault.c' in sources defines this thing. For historical 
reasons - especially the GCCs for embedded
systems (no native GCCs for them, only cross) - the default place for 
"everything" has been the $prefix/$target
alias "$tooldir".  But for "two mode", native or cross, GCCs for for 
system targets the "native" and "sysroot"
places.  The two cases for crosscompilers weren't made different in this 
issue.  That is my thought...

In any case one can always define where the C++ headers should be 
searched via the '--with-gxx-include-dir='
option in GCC configure. For instance :

--with-gxx-include-dir=${SYSROOT}/usr/include/c++/5.3.0

would put it where you would like it being...



More information about the Gcc-help mailing list