[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Linking problem in m68k-uclinux toolchain: crt0.o not found
From:       Denis Vlasenko <vda.linux () googlemail ! com>
Date:       2007-06-27 0:35:42
Message-ID: 200706270235.42845.vda.linux () googlemail ! com
[Download RAW message or body]

On Tuesday 26 June 2007 16:55, Rob Landley wrote:
> > And I try to cross-compile busybox. It works up to the final link,
> > where it complains about crt0.o missing. I tried to cross compile
> > trivial C program and got the same error:
> >
> >  /usr/app/gcc-4.1.2-m68k-uclinux/libexec/gcc/m68k-uclinux/4.1.2/collect2
> >  crt0.o
> >  -L/usr/app/gcc-4.1.2-m68k-uclinux/bin/../lib/gcc/m68k-uclinux/4.1.2
> >  -L/usr/app/gcc-4.1.2-m68k-uclinux/bin/../lib/gcc
> >  -L/usr/lib/../m68k-uclinux/lib
> >  /tmp/cccr3rdn.o -lgcc -lc -lgcc
> > /usr/lib/../m68k-uclinux/bin/ld: crt0.o: No such file: No such file or
> > directory collect2: ld returned 1 exit status
> >
> > I do not see crt0.o anywhere in my cross-compiling toolchain. Not in
> > binutils, not in gcc, not in uclibc. So where should it come from?
> >
> > I am not experienced in this, but IIUC crt0.o is used by toolchains
> > which support static linking only, because I see that native compiler
> > and AMB64 cross-compiler does not try to link against crt0.o, but uses
> > crt1.o etc instead, even if I use -static on gcc command line.
> >
> > Thus maybe the problem is that I failed to explain to uclibc that it
> > needs to produce crt0.o, or maybe I chose wrong cross-compiling prefix
> > (did I need to build m68k-elf cross instead?).

I saw the light after "grep -r STARTFILE_SPEC <gcc_source>".
I need m68k-elf.

..........1 hour later......

busybox builds ok against static uclibc.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic