[comp.emacs] GNU Emacs 18.51 and ISI

cmh@SUNSPOT.LARC.NASA.GOV (C. Michael Holloway) (09/01/88)

Has anyone successfully installed GNU Emacs 18.51 on an Integrated Solutions
machine with the following specifications:

	Machine:    V16S
	Processor:  MC 68225
	OS:         4.1 rev a (ISI's version of 4.3BSD)
	C Compiler: Green Hills (version unknown)

????

If you have, please send me mail letting me know how you did this.  We've
had no luck at all.  Compilation bombs on crt0.c with strange error messages.

Thanks.

			    C. Michael Holloway
		       NASA Langley Research Center
			 cmh@sunspot.larc.nasa.gov

"Unless the Lord builds the house, They labor in vain who build it;
 Unless the Lord guards the city,  The watchman keeps awake in vain."

			    Psalm 127:1

neitzel@sigserv (Martin Neitzel) (09/04/88)

There was almost the same request some days ago.  Looks like I should
make my email-reply public.  If the FSF people would merge these
changes into the official version, it would be fine.

							Martin

To: dg@lakart.UUCP (David Goodenough)
Subject: Re: Getting Emacs to go
In-Reply-To: <226@lakart.UUCP>

In article <226@lakart.UUCP> you write:
dg>
dg>	Unfortunately our C compiler / assembler completely choked up
dg>	when it came time to do something with the revised crt0.c that
dg>	is needed to get emacs to go. If anyone has got emacs running
dg>	on an Integrated Solutions machine (BSD 4.3) [...]

I have, and I have had the same problems.  I should say that we are
using the Greenhills C compiler on our ISIs, not pcc.

The critical point is to place all "asm" code inside a function.
Make sure in your m-isi-ov.h that you are an m68000 box, but *not* an
m68k.  #define ISI68K and take the following code for crt0.c:

#ifdef m68000

_start ()
{
/* On 68000, _start pushes a6 onto stack  */
  
#ifdef ISI68K
	asm ("	.text");
	asm ("	.globl	__start");
	asm ("__start:");
	asm ("	.word 0");
	asm ("	link	fp,#0");
	asm ("	jbsr	_start1");
	asm ("	unlk	fp");
	asm ("	rts");
/* Added by ESM Sun May 24 12:44:02 1987 to get new ISI library to work */
/*	asm ("	.globl  is68020");
	asm ("is68020:");
	asm ("	.long   0x00000000");
	asm ("	.long   0xffffffff");
*/
/* End of stuff added by ESM */
#else /* not ISI68K */
  start1 ();
#endif /* not ISI68k */
}
#endif /* m68000 */
#endif /* m68k */


I figured out how to deal with those "asm"s with 17.62 and 18.46.
Don't ask me how.  Later, when we received 18.48 and patches to
upgrade to 18.50, the "EMS" patches for ISIs were contained, but
unfortunately useless for us (though we have an 68020 processor).
Obviously we are dealing with different compilers/environments on the
ISIs here.  The EMS patch tries to define the symbol `is68020' which
the linker wants.  However, I can't get crt0.c to compile with it.  My
(somewhat crude) solution: link with the gnu-crt0 AND /lib/crt0.c
OBJECTS_MACHINE will care about it, and puts it into the correct
place.

Here are the excerpts from my m-isi.ov.h I consider relevant:


#define ISI68K
[...]
/* Say this machine is a 68000 */

#define m68000
#ifdef m68k
#undef m68k
#endif
[...]
/* Data type of load average, as read out of kmem.  */
/* The new unix kernel is float free, like on SUNs */
#define LOAD_AVE_TYPE long

/* Convert that into an integer that is 100 for a load average of 1.0  */

#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
[...]
/* use the -20 switch to get the 68020 code */
#define C_SWITCH_MACHINE -20
[...]
/* suppress the -O option for old-style optimization.  We are good enough
   anyway... */
#define C_OPTIMIZE_SWITCH
#define C_DEBUG_SWITCH

/* Use the version of the library for the 68020
   because the standard library requires some special hacks in crt0
   which the GNU crt0 does not have.  */

/* #define LIB_STANDARD -lmc */

#define OBJECTS_MACHINE /lib/crt0.o

====

We also have some patches to get gdb running on ISIs.  I must admit
that I have not tried to hard, but they didn't work for me.  If you
should get gdb running, please drop a note.

				good luck,
						Martin
--
Martin Neitzel,  Techn. Univ. Braunschweig, W.Germany
BITNET/EARN:	neitzel@dbsinf6.bitnet	  (mail via bitnet preferred)
UUCP:		neitzel@infbs.uucp  (unido!infbs!neitzel)
from ARPA:	neitzel%dbsinf6.bitnet@psuvax1.psu.edu


Martin Neitzel,  Techn. Univ. Braunschweig, W.Germany
BITNET/EARN:	neitzel@dbsinf6.bitnet	  (mail via bitnet preferred)
UUCP:		neitzel@infbs.uucp  (unido!infbs!neitzel)
from ARPA:	neitzel%dbsinf6.bitnet@psuvax1.psu.edu