This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: cross g++ sysroot and headers
- From: Kai Ruottu <kai dot ruottu at wippies dot com>
- To: Christer Solskogen <christer dot solskogen at gmail dot com>, gcc-help at gcc dot gnu dot org
- Date: Wed, 23 Mar 2016 22:32:34 +0200
- Subject: Re: cross g++ sysroot and headers
- Authentication-results: sourceware.org; auth=none
- References: <ncukmb$m8l$1 at ger dot gmane dot org>
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...