Bootstrap failure on native mingw32

Kai Tietz Kai.Tietz@onevision.com
Tue Apr 15 13:44:00 GMT 2008


gcc-owner@gcc.gnu.org wrote on 15.04.2008 14:40:15:

> gcc-owner@gcc.gnu.org wrote on 15.04.2008 14:28:17:
> 
> > I'm not exactly sure how this one was introduced, but a bootstrap on
> > native i686-pc-mingw32 dies in stage1 libgcc with:
> > 
> > ../../../trunk/libgcc/../gcc/libgcc2.c:2052: warning: no previous
> > prototype for 'getpagesize'
> > ../../../trunk/libgcc/../gcc/libgcc2.c:2062: error: conflicting types
> > for 'VirtualProtect'
> > c:/MinGW/include/winbase.h:1995: error: previous declaration of
> > 'VirtualProtect' was here
> > ../../../trunk/libgcc/../gcc/libgcc2.c:2066: warning: no previous
> > prototype for 'mprotect'
> > 
> > The prototype for VirtualProtect in libgcc2.c is:
> >   extern int VirtualProtect (char *, int, int, int *) 
> > __attribute__((stdcall));
> > 
> > In <winbase.h>, it is:
> >   BOOL __attribute__((__stdcall__)) 
> VirtualProtect(PVOID,DWORD,DWORD,PDWORD);
> > with:
> >   typedef unsigned long DWORD;
> >   typedef int WINBOOL;
> >   typedef WINBOOL BOOL;
> >   typedef DWORD *PDWORD;
> >   typedef void *PVOID;
> > 
> > 
> > Does that ring a bell to anyone? Any idea why it's showing up now even
> > though it looks like this code wasn't modified in the recent past (and
> > my winbase.h hasn't changed since my last successful bootstrap, a
> > month ago).

Here is a patch fixing this problem

2008-04-15  Kai Tietz  <kai.tietz@onevision.com>

        * libgcc2.c (L_trampoline): Disable VirtualProtect declaration
        if _WIN32 is defined.

Cheers,
  Kai

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mingw_libgcc2.txt
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080415/4aa09846/attachment.txt>


More information about the Gcc mailing list