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: [MinGW] Set NATIVE_SYSTEM_HEADER_DIR relative to configured prefix


> From: Mark Mitchell 
> 
> 
> Ranjit Mathew wrote:
> > Hi,
> > 
> >   After Mark's patch in:
> > 
> >   http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00122.html
> 
> Ranjit --
> 
> Sorry, I got these messages out of order.  Now, I understand 
> what you were asking about.
> 
> > So I propose that MinGW's NATIVE_SYSTEM_HEADER_DIR be
> > set relative to its configured prefix as shown by the 
> attached patch.
> 
> That doesn't make sense to me.  There's no guarantee that the 
> MinGW headers are in the same location as the compiler; if 
> your MinGW headers are in /mingw/include, you can still 
> install the compiler in /usr/local.  On most systems, the 
> system header directory is a constant; if it's not, for 
> MinGW, then I think you need a new configure option.
> 
> (Of course, if users are free to put the MinGW headers 
> wherever they like, then if you ship compiler binaries to 
> someone, you can't know where they may have put the headers.  
> So, I would expect people would need to use -isystem in that 
> situation.)
> 
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:

#
# Make local_includedir relative to EXEC_PREFIX 
#
local_includedir=$(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) |
sed -e 's|^$(prefix)||' -e 's|/[^/]*|/..|g'`/include



Historically, the closest thing that mingw has to a hard-coded system
include dir is
the prefix specified by the release manager (Mumit Khan and then me in
this short history since about 1998 -- before then is before my memory)
that has been "/mingw/include"	

Danny


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