From xemacs-m  Wed Apr 23 15:18:05 1997
Received: from iria.mines.u-nancy.fr (galibert@iria.mines.u-nancy.fr [193.49.140.100])
	by xemacs.org (8.8.5/8.8.5) with SMTP id PAA14358
	for <xemacs-beta@xemacs.org>; Wed, 23 Apr 1997 15:18:03 -0500 (CDT)
Received: (from galibert@localhost) by iria.mines.u-nancy.fr (950413.SGI.8.6.12/950213.SGI.AUTOCF) id WAA16617; Wed, 23 Apr 1997 22:17:10 +0200
Message-ID: <19970423221709.35295@iria.mines.u-nancy.fr>
Date: Wed, 23 Apr 1997 22:17:09 +0200
From: Olivier.Galibert@mines.u-nancy.fr
To: Xemacs-beta ML <xemacs-beta@xemacs.org>
Subject: Compiling xemacs-20.* on irix 6.2 in n32 mode
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.70

While making the OS and the compiler able to work on 64b
architectures, SGI designed another mode for using registers
and passing parameters between functions, activated on the
compiler by using -64. Since it was much more efficient ar
using registers even for 32b architectures, they designed
a version for 32b called n32. And it _is_ really better.
This mode should always be used when not using gcc (which
can only do o32 afaik).

Too bad xemacs can't do n32 out of the box. So here is what
I had to do to compile it in this mode:

s/irix6-0.h:
- #define LD_SWITCH_SYSTEM -32
+ #define LD_SWITCH_SYSTEM -n32 -G 0

m/iris4d.h:
- #define LIBS_MACHINE -lmld
+ #define LIBS_MACHINE

- #define C_SWITCH_MACHINE -32
+ #define C_SWITCH_MACHINE -n32 -G 0

(the mld lib does not exist in n32 mode)

I also added a --cflags='-n32 -O2 -G 0 -s' to the configuration
line but it seems that these flags are ignored for configure test
and since o32 and n32 libraries are independant I had to revert
to the CFLAGS env var.

Anyway, once done that the compile has gone succesfully, the dump
was OK and I'm writing this in the resulting xemacs-20.2b1 ;-)

The only broken thing I found so far is the "copy" function.
Instant core. Look like motif lossage in XmClipboardEndCopy.
Gonna investigate it. It's hard time for me to learn motif, anyway.

  Sarayan

PS: I have included xpm, gif, jpeg, png, mule, canna, xim if you
want to know. Too bad I can't use xim. Yet.

