ANNOUNCE selfhosting mingw32

Fri Dec 17 22:37:00 GMT 1999

Hi all ;-)

I have uploaded the self hosting version of mingw32
to and Michael Hirmke has placed them
into the directory

The following is from the file ming-selfhost-README.doc in the distribution.

This is kind of an expansion on what Earnie
did for with mingw32-sup.1.0, except he and I disagree
on binary/text mode issues in the development tools.

This package is targeted for developers who
wish to use the GNU tools to develop/modify
win32 programs written for either the VC++ 5/6,
or GNU development environments with the same
set of tools/headers/libs.

Included are wrappers for gcc and ld
to allow them to act like vc5 cl.exe, link.exe, and lib.exe
anyone with Visual Stupidio who dosen't want
to lay out $500 or $1300 for VC6 prof/ent for an
occasional .c compile should hopefully appreciate this.

Changes to the standard utils.
  All programs use binary mode opens by default,
so piping between programs works correctly.

in ash
  this is the main shell runs .exe .com and #! scripts
including modified Cygwin configure and autoconf configure.
under NT4 you get session history using the up and down arrow
keys if you start sh directly!!
  ps and kill are shell builtins (kill ANY process! DON'T 
kill kernel32.dll!! :)
  see the files .../home/.shrc .../home/func/help
and .../src/fsrc/ash/sh.1 for ash usage.

in fileutils
	install.exe and ln.exe map srcfile to srcfile.exe
and destfile to destfile.exe if srcfile doesn't exist,
none of the fileutils will try to overwrite a file with itself.

in mingw32
  working fork()/wait()/exec() and kill() when compiling with -ufork
  cl.exe/link.exe/lib.exe wrappers for gcc/dlltool, bscmake.exe stub, dtou.exe/utod.exe
to convert \r\n <> \n.

in binutils
  linking with and producing vc5 compatible lib's/obj's (dlltool only)
  C_NT_WEAK symbols handled correctly. see .../src/src/mingw/mkweak.shc for how.

in gcc-2.95.2
  url(s) && small patch for the Platform SDK headers.
  support for all vc5 features except the c++ abi, 
c++ name mangeling and [] zero length arrays in structs. (supported in PSDK.dif)
use -console or -windows for the Platform SDK headers/libs.
(use the Platform SDK headers/libs, and the same libraries for vc5/6 and gcc))

in gdb
  working readline w/session history, suitable for use
as JIT system debugger (debug forkees!!-)

in libiberty
  access() and stat() map file to file.exe, /dev/con* /dev/tty 
/dev/null on process command line with -un_x or -ufork,
many added/wrapped functions for un*x/posix compatibility.

in autoconf
  Path seperator is changed to ; to support the normal
windoze style $path also absolute path/filenames can use drive letters

in gmake
  $VPATH and quoted command lines work correctly now.

in tar
  fork()ing tar -z and -I work correctly for tar.gz and tar.bz2

in sed
  fixes for all known problems passes all tests from sed-3.05

Packages configured built and uploaded
  ash derived from debian via ashos2-emx ;-)
  sh-utils(AKA shellutils)-1.12
  Autoconf-2.13.1 CVS
  automake-1.4a CVS
  binutils-2.9.4 CVS-19990528
  readline-2.2 "w/Earnie's fixes"
  makeinfo-1.68 from texinfo-3.12

Thanks in no particular order are due to
Geoff Noer, Mumit Kahn, and Earnie Boyd,
for inspiring me to finally get off my A*S
and do something about it.

All L/GPL binaries have matching sources,
Sorry to people on 28.8 modems, but
I see no other way to guarantee compliance
with the L/GPL ;-(

<rant /on>
Please do not use so called "text"
mode files/pipes when compiling un*x utils,
anything that always breaks
lseek etc. in the system libc is fundamentally
broken, and should be fixed in the OS.

to convert use dtou.exe or <bleech> utod.exe
<rant /off>

Using text mode configuration files
for your newly written user(s) programs is recommended,
There are too many people out there
who will save a .cfg file from notepad
even when you tell them not to.-)

These programs are
linked with binmode.o, _fmode == 0x8000
stdin/out/err are set to binary mode where
appropriate in __main when this is done.
This means you (or your unix makefile :) can do
for file in *.1;do cat $file|gzip -c9 >/usr/man/man1/$file;done
and it will work as expected.

Packages that needed changes to build/run
correctly, already have the diffs applied.
The diff to the pristine source
is in the root of the
src/$package dir for those who are interested.
The diffs are in the Public Domain, anyone
can use them for any purpose.

Most docs and nls files are missing
or at least not installed, if you need
them goto ,
or your nearest GNU mirror,
some of the files that would be needed
to cross compile these utils using these
sources are also missing.
To cross compile these
from say linux apply the diffs to pristine
sources, don't use the win32 autoconf
just configure and make normally.

Gcc switches that you will need
-Zbin-mode (links with binmode.o see above)
-un_x (links with binmode.o and this libiberty 
        many replaced and new
	funcs for unix/posix compatibility
	allows use of /dev/con* /dev/tty /dev/null
	on the command line of the process
        see src/libiberty)
-ufork (links with binmode.o libiberty and fork.lib 
        replaces malloc &co.
	most programs that fork() will need at least 
        some rewriting see src/src/mingw/fork.c)
-windows (use the Platform SDK headers if installed )
-console (use the Platform SDK headers if installed -DWIN32_LEAN_AND_MEAN)

-lLIBNAME         option to ld.exe (small L)
searches first for LIBNAME then LIBNAME.lib files, then libLIBNAME.a
(should make for easier use under

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list