comp-mail-mush@srhqla.uucp (06/01/89)
From: "Barton E. Schaefer" <island!ucbcad!cse.ogc.edu!schaefer> I've just had an interesting experience with the Green Hills C-386 Compiler which I thought I should pass along. The version string printed by the compiler is: C-386 1.8.4 Copyright (C) 1983,1984,1985,1986,1987,1988 Green Hills Software, Inc. All rights reserved. When compiling mush with this compiler, be sure to replace -O with -X18 in your CFLAGS, to turn off optimization and prevent variables not declared as register from being allocated to registers. I haven't figured out why this causes a problem, but it breaks both the library malloc and INTERNAL_MALLOC on the system I compiled for. [%] If debugging, you probably also want to use -ga to allocate stack frames; otherwise the debugger prints incomplete information. To summarize, change your SysV compiler flags to: CFLAGS= -X18 -DSYSV -DCURSES -DREGCMP -DUSG -DSIGRET=void when using Green Hills C. Just for additional information, ld gives this version string: ld: System V/386 Release 3.0 7/2/87 (shared) : Version 1.8: 1/3/85 ____________ % Interestingly, the seg fault occurred at the same point in the code where Marc Rouleau first encountered problems on his SysV machines, before INTERNAL_MALLOC was provided. Debugging is not yet activated at that point, even if the -d flag is given, so no corrupted pointer warnings will be printed when using INTERNAL_MALLOC. -- Bart Schaefer "And if you believe that, you'll believe anything." -- DangerMouse CSNET / Internet schaefer@cse.ogc.edu UUCP ...{sequent,tektronix,verdix}!ogccse!schaefer