This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed patches
- From: "Danny Smith" <dansmister at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Nov 2007 21:38:20 +1300
- Subject: Re: Unreviewed patches
- References: <20071112110618.GC5451@devserv.devel.redhat.com> <9c03c2dd0711121154k4971a265k9b271f7ad388a83a@mail.gmail.com> <20071113154131.GK5451@devserv.devel.redhat.com>
On Nov 14, 2007 4:41 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Nov 13, 2007 at 08:54:16AM +1300, Danny Smith wrote:
> > > - PR bootstrap/30589 mingw fixincludes hack
> > > http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00092.html
> > > - this doesn't need review yet, but actually someone with access to mingw
> > > or at least M$Win to test it; P1
>
> Thanks for trying.
>
> > I am not been able to get your patch to work on mingw bootstrap.
>
> > Then I get lots of error messages
> >
> > FS error 2 (No such file or directory) reopening
> > 'c++/4.3.0/parallel/settings.h' as stdin
more errors of same
Hi,
Even with your foward-slashify patch I still cannot get the fixincl
machinery to run on mingw32 host. Note that mingw uses the two-process
fix and has never really been tested on mingw before. I suppose using
libiberty's pex routines to run the subrocess rather than system() would
be the way to go to avoid the system() shell nastiness, but....
Even if it were fixed for mingw32 host, it would not be much use anyway:
mingw32 does not put its runtime headers in the system include dir since
Windows does not really have a system root. Instead the runtime header
are installed into the local include dir which is located relative to
EXEC_PREFIX. The local dir takes precedence over the gcc compiler
libdir, so fixincluding a header there has no real effect.
The good news is that your patch does work and fixes the problem for a
mingw-targeted cross compiler. I have tested successfully with
i386-linux host and with cygwin host. IMO this is enough to justify
downgrading priority from P1 to P3
One nit. The machine_name fix wrongly modifies a
#ifndef _stdcall
to
#ifndef __stdcall__
in the w32api file windef.h
This addition to your patch prevents the wrong fix
Index: inclhack.def
===================================================================
--- inclhack.def (revision 130248)
+++ inclhack.def (working copy)
@@ -2504,6 +2504,7 @@
hackname = machine_name;
c_test = machine_name;
c_fix = machine_name;
+ bypass = "_stdcall";
test_text = "/* MACH_DIFF: */\n"
"#if defined( i386 ) || defined( sparc ) || defined( vax )"
After that I get:
Applying machine_name to w32api/ddk/ndis.h
Fixed: w32api/ddk/ndis.h <<< this is a useful fix from "i386" to "__i386__"
Quoted includes in w32api/ddk/ndis.h
Applying io_quotes_def to w32api/ddk/usb.h
Applying io_quotes_def to w32api/oleauto.h
Applying io_quotes_def to w32api/wininet.h
Applying io_quotes_def to w32api/winnt.h
Applying io_quotes_def to w32api/winsock.h
Applying io_quotes_def to w32api/winsock2.h
Applying io_quotes_use to w32api/winsock2.h
Applying mingw_crt_inline to _mingw.h
Fixed: _mingw.h
Danny