This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Combined tree builds for mingw32
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: 'Daniel Jacobowitz' <drow at false dot org>, 'Paolo Carlini' <pcarlini at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 08 May 2007 09:11:45 +1200
- Subject: RE: Combined tree builds for mingw32
> >
> > > The failing command is trying to compile the PCH. This means that
> > > we're including a large number of libstdc++ headers in a
> row. One of
> > > the first ones pulls in c++config.h, which has #undef
> max; but so far,
> > > nothing has included <windows.h>. Later, something includes
> > > gthr-default.h; on this platform that pulls in <windows.h>, which
> > > eventually #define's min. Then later we get <limits>,
> which now sees
> > > the definition.
> > >
> > I see, but I still don't get why this is worse than time
> ago, when the undefs
> > where placed in the middle of stl_algobase.h and nowhere
> else. Do you?
>
> I am just guessing, but I suspect that something before the middle of
> stl_algobase.h caused <windows.h> to be included. Here's the ugly
> patch I'm using right now to get past this:
>
You've probably discovered this already, but...
<windows.h> should not be included by default in libstdc++ on mingw
target.
That is taken care of by config/os/mingw32/os_defines.h.
min/max macros also are taken care of there, but I see the comment is
out-of-date.
Most people I know who build mingw-targeted gcc/binutils natively or
cross, preinstall the
mingw runtime headers and libraries in $(prefix). Unlike other systems,
mingw32 does not have
a standard location for headers or libraries, but uses the
make_relative_prefix dance to find the local dirs.
Danny