[comp.unix.sysv386] Problem compiling GCC on 386 machine

ohurley@cs.tcd.ie (Oisin Hurley) (03/13/91)

I'm trying to compile GCC 1.37.1 on a 386 with no 387. The Unix is
Interactive's product. A certain piece of code causes my compiler to dump
out with the message:

	Fatal error in /lib/comp
	Status 0213

here's the offending bit of code, with the problem line pointed out -- it
actually happens somewhere after the (double) in the text expansion of
the HIGH_BIT_COEFF constant:

#ifdef L_fixunsdfsi
#define HIGH_BIT_INT_COEFF  (1 << (BITS_PER_WORD - 1))
#define HIGH_BIT_COEFF  (2 * (double) (1 << (BITS_PER_WORD - 2)))

SItype
__fixunsdfsi (a)
     double a;
{
  if (a < HIGH_BIT_COEFF) 			<-------- HERE'S WHERE IT HAPPENS
    return (SItype)a;
  /* Convert large positive numbers to smaller ones,
     then increase again after you have a fixed point number.  */
  else
    return ((SItype) (a - HIGH_BIT_COEFF)) + HIGH_BIT_INT_COEFF;
}
#endif

Ok, I realise this is a problem with the compiler I'm using and I need to
get a proper compiler etc (that's why I'm trying to use gcc :-) but it would
be *GREATLY* appreciated if somebody could email me and tell me WHAT could
have caused this and is there a workaround, or what - I've a good idea
that it has something to do with the target machine supposing to have a 387
but is there any way that this assumption can be turned off?


	thanks in advance
		Oisin

- Oisin Hurley
- Dept of Computer Science, Trinity College, Dublin 2, Ireland

--EMAIL: 	ombhurley@cs.tcd.ie

ddc@druco.ATT.COM (CusterDD) (03/16/91)

Oisin Hurley (ombhurley@cs.tcd.ie) of Ireland writes:

>I'm trying to compile GCC 1.37.1 on a 386 with no 387. The Unix is
>Interactive's product. A certain piece of code causes my compiler to dump


You don't say which version of ISC UNIX it is.  And since you don't mention the
brand of compiler/include files, it is hard to help with the compile problem.

I have gcc, gas, and gdb running on ISC 2.2 (COFF), no 387.  You **MIGHT** be able to
use the binaries of these to bootstrap with.  Alot depends on the native
header files and linker (my gcc/COFF uses the native linker).
Anybody in netland know?

If you would like to try this, and there isn't anybody closer, mail me 3 3.5"
HD floppies or 4 5.25" high density and I will put the binaries and support
files on them for you.  I would email them to you, but I don't think it fair
to the net servers to ask them to foot the bill for ~4 Meg.  No charge for this,
but please include a self addressed mailer with postage.

David D. Custer
4184 E. 126th Avenue
Denver Colorado, 80241
USA

(303) 538-3517 (days)
ddc@druco.ATT.COM

rfg@NCD.COM (Ron Guilmette) (03/25/91)

In article <1991Mar12.202245.18197@cs.tcd.ie> ohurley@cs.tcd.ie (Oisin Hurley) writes:
+I'm trying to compile GCC 1.37.1 on a 386 with no 387. The Unix is
+Interactive's product. A certain piece of code causes my compiler to dump
+out with the message:
+
+	Fatal error in /lib/comp
+	Status 0213
+
+Ok, I realise this is a problem with the compiler I'm using and I need to
+get a proper compiler etc (that's why I'm trying to use gcc :-) but it would
+be *GREATLY* appreciated if somebody could email me and tell me WHAT could
+have caused this and is there a workaround, or what - I've a good idea
+that it has something to do with the target machine supposing to have a 387
+but is there any way that this assumption can be turned off?

It seems that Interactive *should* have supplied you with some code
(in the kernel I would imagine) which would do software emulation
of a 387 (when a real *hardware* 387 is not present).

Didn't you get that with your UNIX?  If not, why not?
-- 

// Ron ("Shoot From The Hip") Guilmette
// Internet: rfg@ncd.com      uucp: ...uunet!lupine!rfg
// New motto:  If it ain't broke, try using a bigger hammer.