From owner-freebsd-current Fri May 22 01:32:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA07542 for freebsd-current-outgoing; Fri, 22 May 1998 01:32:52 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA07523; Fri, 22 May 1998 01:32:44 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.8/8.8.7) id SAA07171; Fri, 22 May 1998 18:37:47 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199805220837.SAA07171@cimlogic.com.au> Subject: Re: converting to ELF? In-Reply-To: <199805220813.BAA27700@rah.star-gate.com> from Amancio Hasty at "May 22, 98 01:13:52 am" To: hasty@rah.star-gate.com (Amancio Hasty) Date: Fri, 22 May 1998 18:37:47 +1000 (EST) Cc: jb@cimlogic.com.au, chuckr@glue.umd.edu, jkoshy@FreeBSD.ORG, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Amancio Hasty wrote: > Any clues as to how to complete the tool chain? > > {root} cc -elf foo.c > /usr/libexec/elf/ld: cannot open crt1.o: No such file or directory The elf crt object is built from src/lib/csu/i386-elf. You'll need to build and install that. Before you can "cc -elf foo.c", you need libc and libgcc in elf format. The elf tools you build from src/gnu/usr.bin/binutils only work with objects that they build, so you can't use the installed aout libraries. I'd suggest that you only build an elf libc.a and libgcc.a, not shared versions or you might hose yourself. So cc -static is your friend. 8-) And if you aren't game to install elf libraries in /usr/lib, then use -nostdlib and -nostartfiles and give gcc explicit paths to the build directories of crt1.o, libc.a and libgcc.a. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message