From d6f613410348fbf98c9b888c327b557efa1b72b2 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 26 Mar 2000 20:56:07 +0000 Subject: [PATCH] Tell about using the mingw-based gcc, which is much easier than modifying 2000-03-26 Tor Lillqvist * README.win32: Tell about using the mingw-based gcc, which is much easier than modifying the cygwin gcc to product mingw code for the msvcrt runtime. * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work with a "pure" mingw gcc, too. --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-0 | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-12 | 9 +++++++++ ChangeLog.pre-2-2 | 9 +++++++++ ChangeLog.pre-2-4 | 9 +++++++++ ChangeLog.pre-2-6 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ README.win32 | 30 ++++++++++++++++++++++-------- makefile.cygwin.in | 6 ++++-- 10 files changed, 98 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92f3a66..38a173b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 92f3a66..38a173b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 92f3a66..38a173b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 92f3a66..38a173b 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 92f3a66..38a173b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 92f3a66..38a173b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 92f3a66..38a173b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 92f3a66..38a173b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2000-03-26 Tor Lillqvist + + * README.win32: Tell about using the mingw-based gcc, which is + much easier than modifying the cygwin gcc to product mingw code + for the msvcrt runtime. + + * makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work + with a "pure" mingw gcc, too. + 2000-03-24 Sebastian Wilhelmi * garray.c: Made GArray behave correctly. Now zero_terminated diff --git a/README.win32 b/README.win32 index 5fc2a6b..f1f605c 100644 --- a/README.win32 +++ b/README.win32 @@ -11,11 +11,11 @@ library is used. To build GLib on Win32, you can use either the Microsoft compiler and tools, or gcc. Both the compiler from MSVC 5.0 and from MSVC 6.0 have been used successfully. With gcc I mean gcc-2.95 or gcc-2.95.2 as -distributed by Mumit Khan, running under cygwin-b20.1. To successfully -use gcc, follow the instructions below. We want to use gcc --mno-cygwin, i.e. produce executables (.exe and .dll files) that do -*not* require the cygwin runtime library. This is sometimes called -"mingw32". +distributed by Mumit Khan, either as a mingw version (preferred), or +running under cygwin. To successfully use gcc, follow the instructions +below. We want to use gcc -mno-cygwin, i.e. produce executables (.exe +and .dll files) that do *not* require the cygwin runtime library. This +is called "mingw". To test the GLib functions, go to the tests subdirectory and enter `nmake -f makefile.msc check` or `make -f makefile.cygwin check`. @@ -99,9 +99,23 @@ Building with gcc I use the latest and greatest gcc, gcc-2.95.2. 2.95 will also work. Earlier version might, but you are on your own. -Read these instruction carefully and understand them. If you don't -understand or can't follow the instructions, you probably shouldn't -want to build GLib (or GTk+ or GIMP) yourself anyway. +You can either use gcc running on cygwin, or the "pure" mingw +gcc. Using the latter is much easier. Just fetch the latest version of +gcc for mingw and the msvcrt runtime, currently from +ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1/ +. Download the three zip archives: the gcc--msvcrt, +mingw-msvcrt- and binutils--msvcrt, and unpack +them in a suitable directory. Set up your PATH so that the gcc from +the bin directory that got created above is the one that gets +used. You can skip steps 1--5 below. Even if you run the mingw gcc, +you still want to have cygwin to run make in. + +If you want to run a cygwin-based gcc, it gets much more +complicated. We still want gcc to produce code that does not use +cygwin, but the msvcrt runtime. Read the below instruction carefully +and understand them. If you don't understand or can't follow the +instructions, you probably shouldn't want to build GLib (or GTk+ or +GIMP) yourself anyway. 0) Get and install Cygwin B20.1. diff --git a/makefile.cygwin.in b/makefile.cygwin.in index b445286..968c388 100644 --- a/makefile.cygwin.in +++ b/makefile.cygwin.in @@ -28,8 +28,10 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ CFLAGS = $(OPTIMIZE) -I. -DHAVE_CONFIG_H -# Kludge to get the path to the win32 headers -WIN32APIHEADERS = $(shell echo "\#include " | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!') +# Kludge to get the path to the win32 headers. Should work for both +# gcc running on cygwin, and bare mingw gcc, even if the make is +# running on cygwin (whew). +WIN32APIHEADERS = $(shell echo "\#include " | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015') all : \ config.h \ -- 2.7.4