This is the mail archive of the gcc-patches@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: [patch c/c++]: Unify behavior for native/cross include


On Wed, Jul 28, 2010 at 2:18 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
> 2010/7/28 Richard Guenther <richard.guenther@gmail.com>:
>> On Wed, Jul 28, 2010 at 1:52 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
>>> Hello,
>>>
>>> this patch tries to unify behavior of native- vs. cross-toolchains.
>>> Issue is that the order of the include folders differ (without good
>>> reason) for those. For native the 'local_include_dir' comes before the
>>> 'gcc-internal headers', but for cross the 'gcc-internal headers' are
>>> coming before any other headers. This all makes it pretty hard to
>>> predict for targets like 'mingw', where the some headers (float.h is
>>> here such a case) have to be forwarded by include_next from
>>> target-headers, or by gcc's internal headers.
>>>
>>> By this cause I suggest the following order in general to be used by gcc
>>> ...
>>> ...
>>> GCC_INCLUDE_DIR
>>> LOCAL_INCLUDE_DIR
>>> PREFIX_INCLUDE_DIR
>>> CROSS_INCLUDE_DIR
>>> TOOL_INCLUDE_DIR
>>> SYSTEM_INCLUDE_DIR
>>> FIXED_INCLUDE_DIR
>>> STANDARD_INCLUDE_DIR
>>>
>>> The fixed-include should come before the standard_include_dir, as
>>> those shall be handled by fixed-include. The gcc-internal should be
>>> the first of the C headers and first after the g++-header part.
>>>
>>> ChangeLog
>>>
>>> 2010-07-28 ?Kai Tietz
>>>
>>> ? ? ? ?* cppdefault.c (cpp_include_defaults): Move GCC_INCLUDE_DIR before
>>> ? ? ? ?LOCAL_INCLUDE_DIR and move FIXED_INCLUDE_DIR before
>>> STANDARD_INCLUDE_DIR.
>>>
>>> I tested this for x86_64-w64-mingw32 and for i686-w64-mingw32. Ok for apply?
>>
>> Re-ordering CROSS_INCLUDE_DIR, TOOL_INCLUDE_DIR and
>> SYSTEM_INCLUDE_DIR before FIXED_INCLUDE_DIR is unrelated
>> to your problem at hand, right? ?I see no reason why those couldn't
>> be fixincluded.
>>
>> Richard.
>>
>>> Kai
>>>
>>> --
>>> |? (\_/) This is Bunny. Copy and paste
>>> | (='.'=) Bunny into your signature to help
>>> | (")_(") him gain world domination
>>>
>>
>
> Well, the fixed include move is unrelated to this special issue. But
> AFAIU the fixed-include part was introduced and intended to be used
> for standard-include. But I don't stick to this new place.
>
> Updated patch attached.

That's better.  But I don't think I can approve the patch.

Thanks,
Richard.

> Kai
>
>
> --
> |? (\_/) This is Bunny. Copy and paste
> | (='.'=) Bunny into your signature to help
> | (")_(") him gain world domination
>


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