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: Unreviewed patches


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


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