Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 1998 18:37:47 +1000 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        hasty@rah.star-gate.com (Amancio Hasty)
Cc:        jb@cimlogic.com.au, chuckr@glue.umd.edu, jkoshy@FreeBSD.ORG, freebsd-current@FreeBSD.ORG
Subject:   Re: converting to ELF?
Message-ID:  <199805220837.SAA07171@cimlogic.com.au>
In-Reply-To: <199805220813.BAA27700@rah.star-gate.com> from Amancio Hasty at "May 22, 98 01:13:52 am"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805220837.SAA07171>