[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc fails to build on debian-mipsel

On Mon, Apr 02, 2001 at 11:27:26PM +0200, Florian Lohoff wrote:
> On Mon, Apr 02, 2001 at 02:28:17PM -0400, Ben Collins wrote:
> > On Mon, Apr 02, 2001 at 08:05:08PM +0200, Florian Lohoff wrote:
> > >  stage1/collect2 -Y P,/usr/lib -dynamic-linker /lib/ld.so.1 -o gencheck /usr/lib/crt1.o /usr/lib/crti.o stage1/crtbegin.o -Lstage1 gencheck.o obstack.o -lgcc -lgcc stage1/crtend.o /usr/lib/crtn.o
> > > /usr/lib/crt1.o: In function `__start':
> > > /usr/lib/crt1.o(.text+0x28): undefined reference to `atexit'
> > > /usr/lib/crt1.o: In function `nofini':
> > > /usr/lib/crt1.o(.text+0x7c): undefined reference to `__libc_init_first'
> > > /usr/lib/crt1.o(.text+0xd8): undefined reference to `atexit'
> > > /usr/lib/crt1.o(.text+0x138): undefined reference to `exit'
> > 
> > See that link line? There is no "-lc". That's where the problem is
> > coming from, and I've no idea why -lc isn't there. Check the mips headers
> > in gcc/config/ and the generated spec file to see if you can find where it
> > adds the crtend etc.. and why it doesn't have -lc in there aswell (maybe
> > compare to the other archs like sparc or i386).
> But this is only happening on the 1st stage compiler which itself
> builds ok - But binarys cant be built with the 1st stage compiler.
> So the native compiler is ok but the resulting stage1 is broken.

Exactly, which is why I'm suggesting you check the specs file for the
stage1 compiler, which is generated by the information in the headers in

I've checked myself, and it seems that for mips, it does not set this in
the specs file, it depends on the linker scripts. My suggestion, upgrade
to the latest binutils. Also read the notes about the mips linker script
changes from HJ, as I'm quite sure this relates to the problem you are
having (the -m name has changed). It's possible that making some
symlinks in /usr/lib/ldscripts/ will do the trick.


/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '

Reply to: