Mercury and cygwin32 version b19
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jul 31 01:14:33 AEST 1998
Hi,
I had a go at building Mercury on Windows using the latest version
of cygwin32, version b19.1. It turned out that the problems that
people have reported with this are not problems with the conservative
garbage collector, as I had guessed, but are due to a bug in gcc.
The good news is that the bug in gcc is fixed in egcs version 1.0.2.
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/>.
Mumit Khan's site also has binaries of binutils 2.9.1 for cygwin32.
There is however an incompatibility between the conservative garbage
collector and binutils 2.9.1 for cygwin32. The following patch should
(I hope) fix that bug.
I've committed this patch into our development sources, so it will be
included in future releases of Mercury. I include it here only in case
someone wants to port an existing version of Mercury to cygwin32
version b19 with binutils 2.9.1.
Index: config.h
===================================================================
RCS file: /home/staff/zs/imp/mercury/boehm_gc/config.h,v
retrieving revision 1.12
diff -u -u -c -r1.12 config.h
/usr/bin/diff: conflicting specifications of output style
*** config.h 1998/05/20 19:01:53 1.12
--- config.h 1998/07/29 12:46:54
***************
*** 606,615 ****
# endif
# ifdef CYGWIN32
# define OS_TYPE "CYGWIN32"
! extern int _bss_start__;
! # define DATASTART ((ptr_t)&_bss_start__)
extern int _data_end__;
! # define DATAEND ((ptr_t)&_data_end__)
# undef STACK_GRAN
# define STACK_GRAN 0x10000
# define HEURISTIC1
--- 606,627 ----
# endif
# ifdef CYGWIN32
# define OS_TYPE "CYGWIN32"
! extern int _data_start__;
extern int _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 users
mailing list