From xemacs-m  Thu Apr 24 22:51:07 1997
Received: from venus.Sun.COM (venus.Sun.COM [192.9.25.5])
	by xemacs.org (8.8.5/8.8.5) with SMTP id WAA18575
	for <xemacs-beta@xemacs.org>; Thu, 24 Apr 1997 22:51:06 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by venus.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id UAA10919; Thu, 24 Apr 1997 20:50:38 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id UAA29342; Thu, 24 Apr 1997 20:50:34 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id UAA12917; Thu, 24 Apr 1997 20:50:35 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id UAA14992; Thu, 24 Apr 1997 20:50:32 -0700
Date: Thu, 24 Apr 1997 20:50:32 -0700
Message-Id: <199704250350.UAA14992@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: Olivier.Galibert@mines.u-nancy.fr
Cc: Xemacs-beta ML <xemacs-beta@xemacs.org>
Subject: Compiling xemacs-20.* on irix 6.2 in n32 mode
In-Reply-To: <19970423221709.35295@iria.mines.u-nancy.fr>
References: <19970423221709.35295@iria.mines.u-nancy.fr>
X-Mailer: VM 6.24 under 20.1 XEmacs Lucid (beta15)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "OG" == Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr> writes:

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

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

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

The library can be autodetected via AC_CHECK_LIB, perhaps conditional
on running on an SGI.

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

OG> (the mld lib does not exist in n32 mode)

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

The new configure will do a better job of this.  At least, the design
is that configure runs the same compiler as the "real" build later on.

Perhaps we want to autodetect the -n32 flag and use it if available.
The XEmacs SGI users will have to decide.

Martin

