[patch win32]: fix for PR target/41943

Richard Guenther richard.guenther@gmail.com
Fri Jul 23 09:14:00 GMT 2010


On Thu, Jul 22, 2010 at 11:11 PM, Richard Henderson <rth@redhat.com> wrote:
> On 07/22/2010 01:36 PM, Kai Tietz wrote:
>> the headers aren't the issue. As you see they are working nicely with
>> native compilers (see Danny's comment). But the flaw begins with
>> sysroot and cross-compilers, as here suddenly the internal gcc-headers
>> simply override the system-headers (to mark this explicit: not for
>> native). So this means that the gcc headers would be in need to know,
>> if they are used by native toolchain and therefore don't have to
>> forward, or if they are part of a sysrooted or a cross-compiler
>> toolchain, where they need to do this.
>> So I heard now pretty often that to change cross-compiler/sysroot
>> include order here is a flaw. But I would really like to know what is
>> the reason for the current behavior (not a meaning, a reason please)
>> especially in respect to native/cross.
>
> Err.. I'm not sure quite what you're talking about.
>
> native:
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/local/include
>  /usr/lib/gcc/x86_64-redhat-linux/4.4.4/include
>  /usr/include
> End of search list.
>
> cross+sysroot:
> #include "..." search starts here:
> #include <...> search starts here:
>  /local/rth/gcc/run-axp/lib/gcc/alphaev67-linux/4.6.0/include
>  /local/rth/gcc/run-axp/lib/gcc/alphaev67-linux/4.6.0/include-fixed
>  /local/rth/gcc/run-axp/lib/gcc/alphaev67-linux/4.6.0/../../../../alphaev67-linux/include
>  /local/rth/gcc/run-axp/alphaev67-linux/sys-root/usr/include
> End of search list.
>
> In both cases gcc-include preceeds the system-include dir.
> The only difference is that native also searches local-include
> (although I can't tell you why that preceeds gcc-include).

I wondered about this myself, but it is even documented this way
in cpp.texi ...

It seems that there is no local include dir for cross+sysroot.

I'm sure Joseph knows why?

Richard.



More information about the Gcc-patches mailing list