[comp.emacs] Gnu Emacs on Encore MultiMax

bzs@bu-cs.UUCP (09/30/87)

Someone was asking about building gnu emacs on an encore multimax, I
just had to fix some things to get 18.49 to build so I figured I'd
pass them along (FSF: I consider these tentative, they do the right
thing but I don't believe in the right way. Either we need a new
symbol for the new Umax systems, or these might work on the old one
(haven't tried yet) or a different approach is needed, this should get
someone thru the night anyhow.) The only change is three #if[n]def UMAX's
added to unexec.c which I've appended below, the new Umax systems
relocate data slightly differently than unexec was handling.

This is for Multimax/320s (NS32332) running Umax 3.0 or above (which
I believe they have to be, 2.0 only runs on the 120, right? Anyhow.)

If you want to compile emacs optimized (-O) then you will also need to add:

#define C_SWITCH_MACHINE -q nocompiler-registers

(see 'man cc') to config.h. Remember that you use m-ns16.h and
s-umax.h as described in ./etc/MACHINES .

Cheers.

	-Barry Shein, Boston University

*** unexec.c-dist	Tue Sep 29 15:20:15 1987
--- unexec.c	Tue Sep 29 17:50:03 1987
***************
*** 428,433
    register int scns;
  #endif /* COFF */
    unsigned int bss_end;
  
    pagemask = getpagesize () - 1;
  

--- 428,436 -----
    register int scns;
  #endif /* COFF */
    unsigned int bss_end;
+ #ifdef UMAX
+   extern etext;
+ #endif
  
    pagemask = getpagesize () - 1;
  
***************
*** 435,440
  #ifdef NO_REMAP
    data_start = (int) start_of_data ();
  #else /* not NO_REMAP */
    if (!data_start)
      data_start = (int) start_of_data ();
  #endif /* not NO_REMAP */

--- 438,444 -----
  #ifdef NO_REMAP
    data_start = (int) start_of_data ();
  #else /* not NO_REMAP */
+ #ifndef UMAX
    if (!data_start)
  #endif
      data_start = (int) start_of_data ();
***************
*** 436,441
    data_start = (int) start_of_data ();
  #else /* not NO_REMAP */
    if (!data_start)
      data_start = (int) start_of_data ();
  #endif /* not NO_REMAP */
    data_start = ADDR_CORRECT (data_start);

--- 440,446 -----
  #else /* not NO_REMAP */
  #ifndef UMAX
    if (!data_start)
+ #endif
      data_start = (int) start_of_data ();
  #endif /* not NO_REMAP */
    data_start = ADDR_CORRECT (data_start);
***************
*** 526,531
  #endif
  #ifndef NO_REMAP
    f_ohdr.text_start = (long) start_of_text ();
    f_ohdr.tsize = data_start - f_ohdr.text_start;
    f_ohdr.data_start = data_start;
  #endif /* NO_REMAP */

--- 531,539 -----
  #endif
  #ifndef NO_REMAP
    f_ohdr.text_start = (long) start_of_text ();
+ #ifdef UMAX
+   f_ohdr.tsize = (long) &etext;
+ #else
    f_ohdr.tsize = data_start - f_ohdr.text_start;
  #endif
    f_ohdr.data_start = data_start;
***************
*** 527,532
  #ifndef NO_REMAP
    f_ohdr.text_start = (long) start_of_text ();
    f_ohdr.tsize = data_start - f_ohdr.text_start;
    f_ohdr.data_start = data_start;
  #endif /* NO_REMAP */
    f_ohdr.dsize = bss_start - f_ohdr.data_start;

--- 535,541 -----
    f_ohdr.tsize = (long) &etext;
  #else
    f_ohdr.tsize = data_start - f_ohdr.text_start;
+ #endif
    f_ohdr.data_start = data_start;
  #endif /* NO_REMAP */
    f_ohdr.dsize = bss_start - f_ohdr.data_start;