[uClibc]m68k-elf-g++ linking problems

Loïc Jeannin ljeannin at perax.fr
Wed Mar 5 16:57:51 UTC 2003


Hi,

I'm trying to compile a project using c++ and pthread on a MC5275C3 with
uClinux. The uClibc (0.9.9) provided with m68k-elf-tools (20020410) doesn't 
support pthreads. 
I've tried to compile against a fresh uClibc (0.9.19), and against the
uClibc provided in the uClinux dist (20020927) with the same results.

m68k-elf-g++ -m5307 -Wl,-elf2flt  -I../res
-I../../lib/PXIAPP_FileMsg/res -I../../lib/txobject/layer1/inc
-I../../lib/md5  gestion_donnees.cpp -L../../lib/PXIAPP_FileMsg/res
-L../../lib/txobject/layer1/lib  -L../../lib/md5
-L/home/loic//work/uClibc/lib/
  \
log.o datamemo.o loggestion.o -o gdh -lFileMsg -llayer1 -lmd5
-lpthread -lstdc++ -liostream -lc -lgcc
gdh.elf2flt: In function `operator new [](unsigned long, void *)':
/home/davidm/work/m68k-elf-tools/m68k-elf-gcc/gcc/include/new(.gnu.linkonce.t.stat+0x1a):
undefined reference to `__xstat'
collect2: ld returned 1 exit status
make: *** [gdh] Erreur 1

How can I fix that ?

An other question: how can I tell m68k-elf-g++ where to find the include
without having it barking "it's not ANSI C++ compliant !". (I've already
tried "extern "C" {}" around the include ...)

m68k-elf-g++ -m5307 -Wl,-elf2flt  -I../res
-I../../lib/PXIAPP_FileMsg/res -I../../lib/txobject/layer1/inc
-I../../lib/md5 -I/home/loic//work/uClinux-dist/uClibc/include -c
datamemo.cpp -o datamemo.o
In file included from
/home/loic/work/uClinux-dist/uClibc/include/netinet/in.h:250,
 from ../res/gdh.h:7,
 from datamemo.cpp:1:
/home/loic/work/uClinux-dist/uClibc/include/bits/in.h:69:
 ANSI C++ forbids data member `ip_opts'
 with same name as enclosing class
 make: *** [datamemo.o] Erreur 1


 Thanks

 Loïc



More information about the uClibc mailing list