This is the mail archive of the gcc@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]

The TOOL_INCLUDE_DIR and -iprefix


The TOOL_INCLUDE_DIR is an additional place where gcc looks for
headers, after the GCC_INCLUDE_DIR but before /usr/include.  I believe
its primary purpose is for cross compilation, although we also seem to
put our private <assert.h> there (why is unclear).

The actual location is $(prefix)/$(target_alias)/include, but for some
reason it is actually defined as
$(libsubdir)/$(unlibsubdir)/$(target_alias)/include.  $(unlibsubdir)
is "../../../.." which takes us back out of
lib/gcc-lib/TARGET/VERSION.

One effect - possibly the only effect - of that rather odd definition
is that cpp's -iprefix option affects the TOOL_INCLUDE_DIR as well as
the GCC_INCLUDE_DIR.  If you do -iprefix /tmp/include,
TOOL_INCLUDE_DIR will wind up as /include, which is probably not what
you wanted.

So, several questions:

Is -iprefix supposed to affect the TOOL_INCLUDE_DIR?
If so, does the current behavior make sense?
If it doesn't, then what should the behavior be?
Should a native compiler be looking in the TOOL_INCLUDE_DIR at all?

It might also help to give examples of the intended contents of the
TOOL_INCLUDE_DIR, and the intended use of -iprefix.  I am not very
familiar with how gcc is used in cross-compilation.

zw

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