Has anybody used 0.9.30 on sh4?

Filippo ARCIDIACONO filippo.arcidiacono at st.com
Tue Feb 24 07:58:03 UTC 2009


 

> -----Original Message-----
> From: uclibc-bounces at uclibc.org 
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Rob Landley
> Sent: Monday, February 23, 2009 8:10 PM
> To: Carmelo AMOROSO
> Cc: uclibc at uclibc.org
> Subject: Re: Has anybody used 0.9.30 on sh4?
> 
> On Monday 23 February 2009 09:49:28 Carmelo AMOROSO wrote:
> > Rob Landley wrote:
> > > If I enable CTOR/DTOR support, I get undefined _init and 
> _fini.  I 
> > > don't remember which .o file those two are in, but it's 
> linking in 
> > > the same group as all the other targets and those work, 
> sh4 doesn't.
> > >
> > > # gcc -v thread-hello2.c -lpthread
> > > ...

Could you post the whole verbose output?
I suspect that your native gcc is badly configured.
Anyway the _init and _fini symbols are defined in /usr/lib/crti.o.

> > > /usr/bin/../lib/crt1.o: In function `_start':
> > > (.text+0x24): undefined reference to `_init'
> > > /usr/bin/../lib/crt1.o: In function `_start':
> > > (.text+0x28): undefined reference to `_fini'
> > > collect2: ld returned 1 exit status
> >
> > Hi Rob,
> > sorry for the dummy question... are you compiling on a sh4 box I 
> > imagine, aren't you ?
> 
> I'm compiling under qemu emulating an sh4 box.
> 
> If you'd like to reproduce this setup, you can do this:
> 
> 1) Build the latest qemu-svn from source.  (It builds with 
> gcc 4 now, just ./configure; make; make install)
> 
> 2) Download and build the development version of firmware 
> linux for sh4.
> 
> wget http://landley.net/hg/firmware/archive/tip.tar.gz
> extract it, cd into it.
> ./build.sh sh4
> ./run-from-build.sh sh4
> 
> You should get a shell prompt inside the qemu instance, which 
> has a native gcc.  (Why the cross compiler works but the 
> native compiler doesn't, I have no
> idea.)
> 
> Rob
Filippo.
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc
> 



More information about the uClibc mailing list