This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trunk] RFA: translate built-in include paths for sysroot (issue4641076)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Chris Demetriou <cgd at google dot com>
- Cc: reply at codereview dot appspotmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Sun, 26 Jun 2011 14:28:10 +0000 (UTC)
- Subject: Re: [trunk] RFA: translate built-in include paths for sysroot (issue4641076)
- References: <20110626060843.544C11E8175@cgda.mtv.corp.google.com>
On Sat, 25 Jun 2011, Chris Demetriou wrote:
> For the C headers, add_standard_paths prepends the sysroot location to
> the /usr/include path (since that's what's specified in cppdefault.c for
> that path). It doesn't do the same for the C++ include path, though
> (again, as specified in cppdefault.c).
It seems to me that what's really wanted here is to change the add_sysroot
flag for the C++ path (all of the C++ paths?), rather than adding special
code to detect paths starting with the sysroot and reinterpret them. And
so making configure detect when the --with-gxx-include-dir setting starts
with the sysroot and adjusting the flag accordingly in that case would be
a cleaner solution - that way it would be obvious that the semantics of
the relocation are exactly the same as for other sysrooted paths, whereas
it isn't when the relocation goes through different code paths in the
compiler.
--
Joseph S. Myers
joseph@codesourcery.com