From trost@cloud.rain.com  Wed Feb 16 19:59:29 2000
Return-Path: <trost@cloud.rain.com>
Received: from builder.freebsd.org (builder.FreeBSD.ORG [204.216.27.24])
	by hub.freebsd.org (Postfix) with ESMTP id 7F1BD37B53B
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Feb 2000 19:59:29 -0800 (PST)
	(envelope-from trost@cloud.rain.com)
Received: from grey.cloud.rain.com (c1029014-a.bvrtn1.or.home.com [24.12.160.67])
	by builder.freebsd.org (Postfix) with ESMTP id 00070132ED
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Feb 2000 19:58:48 -0800 (PST)
Received: (qmail 25557 invoked by uid 236); 17 Feb 2000 03:59:27 -0000
Message-Id: <20000217035926.25556.qmail@grey.cloud.rain.com>
Date: 17 Feb 2000 03:59:26 -0000
From: trost@cloud.rain.com
Reply-To: trost@cloud.rain.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Problems building a.out's
X-Send-Pr-Version: 3.2

>Number:         16770
>Category:       i386
>Synopsis:       Can't build a.out binaries
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 16 20:00:01 PST 2000
>Closed-Date:    Fri Jul 28 18:32:17 PDT 2000
>Last-Modified:  Fri Jul 28 18:40:22 PDT 2000
>Originator:     Bill Trost
>Release:        FreeBSD 4.0-20000208-CURRENT i386
>Organization:
Trost Computing
>Environment:

	Stock 4.0-RELEASE-to-be, with all the 2.x and 3.x compat libraries.

>Description:

	If you specify "-aout" on the cc command line, you get the
	error message "ld: crt0.o: No such file or directory" (or
	c++rt0.o if -shared is specified).

>How-To-Repeat:

	$ echo 'main() {print("Oh, Hell World.\n");}' > foo.c
	$ cc -aout foo.c

>Fix:

	Got me -- I don't understand the a.out magic well enough to
	start diagnosing it.  If I remove crt.o from the ld command line,
	ld then complains about libgcc.a having bad magic -- presumably
	it is using the wrong library.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Fri Jul 28 18:32:17 PDT 2000 
State-Changed-Why:  
You aren't quite understanding the binary creation process.  ``cc -aout'' 
works in that it generates an a.out object module.  In order to create an 
a.out binary (as with an ELF binary), you need to have the crtX.o and libc, 
etc. as a.out versions also.  A.out versions of CSU and standard libraries 
do not come with FreBSD by default.  You need to build an a.out crt0.o using 
``cc -aout'' first along with any libraries you will need. 


Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Fri Jul 28 18:32:17 PDT 2000 
Responsible-Changed-Why:  
I'm mr. toolchain. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=16770 
>Unformatted:
