This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [MinGW] Set NATIVE_SYSTEM_HEADER_DIR relative to configured prefix
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Danny Smith <dannysmith at clear dot net dot nz>
- Cc: 'Ranjit Mathew' <rmathew at gmail dot com>, 'GCC Patches' <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 05 Jun 2006 09:37:49 -0700
- Subject: Re: [MinGW] Set NATIVE_SYSTEM_HEADER_DIR relative to configured prefix
- References: <000901c686c5$3ad69ae0$d94861cb@anykey>
Danny Smith wrote:
> Historically, mingw host doesn't have a "system include dir". Instead
> host relies on a local dir being in consistent place relative to exec
> prefix, and this in turn means that it is consistent relative to the gcc
> driver, ie, in x-mingw:
Yes, we use a similar technique for our cross releases; the "system
headers" are in $prefix/sysroot/include. We point the system root at
that $prefix/sysroot, and arrange for the entire toolchain to be
relocatable. Then, you can put it anywhere you like, and it still finds
the system headers.
I don't think it's a good idea to change the NATIVE_SYSTEM_HEADER_DIR
default, as that means that if I build a MinGW compiler, for an existing
MinGW system, the header directory will be incorrect. In other words,
changing NATIVE_SYSTEM_HEADER_DIR is making MinGW more unlike other
systems, but not solving the problem in 100% of the cases.
I understand that something about sysroot isn't working for MinGW; to
me, it sounds like that's the right mechanism for solving this problem.
I'm going to respond to Ranjit's mail about the particular macros
separately.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713