From xemacs-m  Sun Jun  1 03:17:59 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id DAA18091
	for <xemacs-beta@xemacs.org>; Sun, 1 Jun 1997 03:17:58 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id BAA23423; Sun, 1 Jun 1997 01:35:09 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id BAA19533; Sun, 1 Jun 1997 01:16:48 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id BAA28166; Sun, 1 Jun 1997 01:16:46 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id BAA06163; Sun, 1 Jun 1997 01:16:45 -0700
Date: Sun, 1 Jun 1997 01:16:45 -0700
Message-Id: <199706010816.BAA06163@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: Takanori Saneto <sanewo@ba2.so-net.or.jp>
Cc: xemacs-beta@xemacs.org
Subject: Re: b3 configure failure on FreeBSD-3.0 fix
In-Reply-To: <87raenmqyg.fsf@sanewo.ba2.so-net.or.jp>
References: <199705310408.VAA05133@mantar.slip.netcom.com>
	<87raenmqyg.fsf@sanewo.ba2.so-net.or.jp>
X-Mailer: VM 6.31 under 20.3 XEmacs Lucid (beta3)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "Takanori" == Takanori Saneto <sanewo@ba2.so-net.or.jp> writes:

Takanori> I also got same error from configure. (FreBSD-3.0-CURRENT, gcc-2.7.2.1)
Takanori> In article <199705310408.VAA05133@mantar.slip.netcom.com>,
Takanori> 	"Manfred A. Antar" <manfred@mantar.slip.netcom.com> writes:
>> After removing "start" from
>> #define LD_SWITCH_SYSTEM -e start -dc -dp
>> in src/s/freebsd.h everthing builds fine.

>> the errors from config.log :
>> gcc: start: No such file or directory.

Takanori> In configure.in, there are many places like:

Takanori> ... = ... `echo $some_flag_variable` ...

Takanori> which, if $some_flag_variable starts with something which "echo"
Takanori> recognizes as its options, may cause problem.

Takanori> In our case, FreeBSD 3.0 echo (built into "sh") treats "-e" as an
Takanori> option (for "expand escape sequence").

How about just reversing the order of the options?  Try:

#define LD_SWITCH_SYSTEM -dc -dp -e start

or even

#define LD_SWITCH_SYSTEM -dc -dp

Are those linker switches really necessary at all?  "-e start" should
be the default.  Here's an extract from the GNU ld docs:

`-d'
`-dc'
`-dp'
     These three options are equivalent; multiple forms are supported
     for compatibility with other linkers.  They assign space to common
     symbols even if a relocatable output file is specified (with
     `-r').  The script command `FORCE_COMMON_ALLOCATION' has the same
     effect.  *Note Option Commands::.

How come I've managed to get through life without having to worry
about "assigning space to common symbols"?  Do we use "-r"?

Please let us know what you find out.

Takanori> Maybe, something similar to "echo" but does no option handling should
Takanori> be used (by defining shell function?).

Sun's built-in sh echo has no options.  That seems like a Good Thing.

Martin

