[patch c/c++]: Unify behavior for native/cross include
Kai Tietz
ktietz70@googlemail.com
Wed Jul 28 12:13:00 GMT 2010
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?
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inc_order.diff
Type: application/octet-stream
Size: 2111 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100728/194d2bc1/attachment.obj>
More information about the Gcc-patches
mailing list