gcc-2.95.3-4 to mingw

Danny Smith danny_r_smith_2001@yahoo.co.nz
Wed May 16 21:34:00 GMT 2001

Hello all,

Attached diff file are my changes to cygwin's gcc-2.95.3-4 src to get
it to build under mingw.  I have also built from FSF gcc-2.95.3
(release) source with similar set of patches (on top of Mumits Jan 2000
diffs), but I thought keeping in sync with cygwin version would have
advantages as far as maintenance and testing.   I have additional gcc
patches that I would like to add to both cygwin and mingw, which is
another reason for me wanting to sync gcc src.

These are the main differences to cygwin version 

libio  _IO_pos_t/_IO_off_t type mismatch:  These were necessitated by
the type mismatches between header files and implementation files.
Refer here:
It is only a problem with msvcrt version of mingw because in crtdll
version, _IO_pos_t and _IO_off_t are same basic type. Ditto for cygwin.
  In mingw, the former resolves to long long, the latter long, as per
resp. C runtime types.  

__gthread_getspecific steps on GetLastError: refer here

One other little bit, a recurring problem with sys_nerr and
sys_errlist[] and dllimport in libiberty/strerror.c.  This should
probably be sent to libiberty; I haven't included in ChangeLog.

I haven't done much testing of above changes with this particular
but they have not caused any problems since initial testing with 2.95.3
prerelease 1 in Jan (I think) and release in March.  The main
between my prior builds (which I have tested extensively) and this is:

config/i386/cygwin.h:  Recent changes to this get rid of use of builtin
specs to accomodate mno-cygwin-all search dirs are specified in specs
file. Perhaps that could be done for mingw as well, but the way I have
built is to use the default builtin specs as in prior mingw releases. 
I've put a guard in so that cygwin's undefs don't get applied to a
native mingw build.

DIR_SEPARATOR: make '/' the default for mingw, like cygwin.

version.c: insert mingw into the version string.  I tried to use an 
#ifdef __MINGW32__ here to get distinct version string for mingw vs
cygwin but that breaks the sed script in configure.  The 'cygwin-mingw'
bit of the string won't do of course, but is the last of my concerns at
the moment.  

I configured like so:
../gcc-2.95.3/configure  --prefix=/mingw --host=mingw32
--disable-nls --enable-threads=win32 --enable-languages=f77,c++

and built like so:
make "CFLAGS=-O2" bootstrap

This build, of course, will provide the mingw-extra bits for
the cygwin -mno-cygwin folk.


http://messenger.yahoo.com.au - Yahoo! Messenger
- Voice chat, mail alerts, stock quotes and favourite news and lots more!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-2.95.3-4m.diff
Type: text/x-diff
Size: 14011 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20010516/c7b184d3/attachment.bin>

More information about the Cygwin-apps mailing list