diff: port to cygwin32 version b19

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Jul 31 01:00:34 AEST 1998


Port Mercury to cygwin32 version b19 and to binutils 2.9.1 on that platform.

boehm_gc/config.h:
	Change the definition of DATASTART and DATAEND for cygwin32
	to work with binutils 2.9.1.

README.MS-Windows:
	Mention that for b19, you need to use egcs 1.0.2
	instead of the gcc that comes with b19.

NEWS:
	Mention these changes.

Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.110
diff -u -r1.110 NEWS
--- NEWS	1998/07/22 15:20:14	1.110
+++ NEWS	1998/07/30 14:58:13
@@ -433,6 +433,10 @@
 
 * The system has been ported to Linux/PPC.
 
+* The system has been ported to work with version b19 of cygwin32
+  (this port has not been tested well, though). 
+  See README.MS-Windows for details.
+
 * We've updated to version 4.12 of the Boehm garbage collector.
 
 * Numerous bug fixes.
Index: README.MS-Windows
===================================================================
RCS file: /home/mercury1/repository/mercury/README.MS-Windows,v
retrieving revision 1.9
diff -u -r1.9 README.MS-Windows
--- README.MS-Windows	1998/02/06 16:04:07	1.9
+++ README.MS-Windows	1998/07/30 14:53:12
@@ -17,14 +17,26 @@
 To use or build Mercury on Windows, you need to first get gnu-win32
 from Cygnus, and install it. 
 
-(If you're going to use a binary distribution of Mercury for Windows,
+If you're going to use a binary distribution of Mercury for Windows,
 you need to make sure that you get a version of gnu-win32 that is
 compatible with the one that the binary distribution was compiled with.
-Currently we suggest using gnu-win32 version b18.)
+For the current binary distributions, that means version b18.
+
+The version of gcc that comes with gnu-win32 version b19 (and b19.1),
+called `gcc 2.7-b19', has a bug which causes it to generate incorrect
+code when compiling Mercury.  So if you want to use gnu-win32 version b19,
+then you need to also install a version of gcc that has this bug fixed,
+such as egcs version 1.0.2 or later.  Note that Mercury has not yet
+been tested properly with b19, so currently we recommend using b18.
 
 You can download gnu-win32 from <ftp://ftp.cygnus.com/pub/gnu-win32>.
+You can download a binary distribution of egcs 1.0.2 for gnu-win32
+from <http://www.xraylith.wisc.edu/~khan/software/gnu-win32/>
+or <ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin32/releases/>.
 
-Once you have installed gnu-win32, check that `bash' and `gcc' work. 
+Once you have installed gnu-win32 and (for b19) egcs, check that
+`bash' and `gcc' work.   Make sure that `gcc --version' does not
+report `2.7-b19'.
 
 For more information on gnu-win32, see <ftp://ftp.cygnus.com/pub/gnu-win32>
 or <http://www.cygnus.com/misc/gnu-win32/>.
Index: boehm_gc/config.h
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/config.h,v
retrieving revision 1.12
diff -u -r1.12 config.h
--- config.h	1998/05/20 19:01:53	1.12
+++ config.h	1998/07/30 14:40:33
@@ -606,10 +606,22 @@
 #   endif
 #   ifdef CYGWIN32
 #       define OS_TYPE "CYGWIN32"
-        extern int _bss_start__;
-#       define DATASTART       ((ptr_t)&_bss_start__)
+        extern int _data_start__;
         extern int _data_end__;
-#       define DATAEND          ((ptr_t)&_data_end__)
+        extern int _bss_start__;
+        extern int _bss_end__;
+	/* For binutils 2.9.1, we have			*/
+	/*	DATASTART   = _data_start__		*/
+	/*	DATAEND	    = _bss_end__		*/
+	/* whereas for some earlier versions it was	*/
+	/*	DATASTART   = _bss_start__		*/
+	/*	DATAEND	    = _data_end__		*/
+	/* To get it right for both, we take the	*/
+	/* minumum/maximum of the two.			*/
+#   	define MAX(x,y) ((x) > (y) ? (x) : (y))
+#   	define MIN(x,y) ((x) < (y) ? (x) : (y))
+#       define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__))
+#       define DATAEND	 ((ptr_t) MAX(_data_end__, _bss_end__))
 #	undef STACK_GRAN
 #       define STACK_GRAN 0x10000
 #       define HEURISTIC1

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list