From xemacs-m  Fri Dec 27 07:47:46 1996
Received: from venus.Sun.COM (venus.Sun.COM [192.9.25.5])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with SMTP
	  id HAA29434 for <xemacs-beta@xemacs.org>; Fri, 27 Dec 1996 07:47:44 -0600 (CST)
Received: from Eng.Sun.COM ([129.146.1.25]) by venus.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id FAA11662 for <xemacs-beta@xemacs.org>; Fri, 27 Dec 1996 05:47:11 -0800
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id FAA16728; Fri, 27 Dec 1996 05:47:08 -0800
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id FAA26469; Fri, 27 Dec 1996 05:47:09 -0800
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id FAA01423; Fri, 27 Dec 1996 05:47:06 -0800
Date: Fri, 27 Dec 1996 05:47:06 -0800
Message-Id: <199612271347.FAA01423@xemacs.eng.sun.com>
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: XEmacs Beta Test <xemacs-beta@xemacs.org>
Subject: Building with gcc on Solaris 2.5
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>
Mime-Version: 1.0 (generated by tm-edit 7.97)
Content-Type: text/plain; charset=US-ASCII

Various people have reported problems building with gcc on Solaris
when gcc was installed to use the GNU linker instead of the system
linker.  Installing gcc this way is probably a mistake, but XEmacs
should work nevertheless.  

For some reason, gcc will use the GNU linker *EVEN IF* -fno-gnu-linker
is specified on the gcc command line.  The only way out seems to be to
call ld directly.

This patch uses that approach and seems to work.

Martin

*** /tmp/geta28539	Fri Dec 27 05:40:57 1996
--- Makefile.in.in	Fri Dec 27 02:59:27 1996
***************
*** 93,100 ****
  all::
  #endif
  
  dynodump.so: ${srcdir}/_dynodump.h $(OBJS)
! 	$(CC) -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
  
  _relocate.o: ${srcdir}/$(ARCH)/_relocate.c
  	$(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c
--- 94,102 ----
  all::
  #endif
  
+ # Always use system linker to link dynodump.so
  dynodump.so: ${srcdir}/_dynodump.h $(OBJS)
! 	PATH=/usr/ccs/bin:$PATH ld -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
  
  _relocate.o: ${srcdir}/$(ARCH)/_relocate.c
  	$(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c

