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 > > ... > > /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 _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
