This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cross g++ sysroot and headers


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]