|
Re: Building pthread.: msg#00068gnu.cegcc.devel
Hi Pedro, thanks for the hints, I got libpthread compiling now. Since __MINGW32__ is defined, the code assumes some things that are not true for WinCE, e.g. like having errno. Instead of modifying mingw32ce now I just modify the pthread-w32-2.8.0 code and add a few more compiler flags, see the attached diff file. I compile with make CROSS=arm-wince-mingw32ce- CC="arm-wince-mingw32ce-g++ -DWINCE -DNEED_ERRNO -D_ARM_ -D__CRTDLL__ -D_DLL" clean GC PS: I still can't compile jamvm because of missing liltdl. Do you know where I can find it for WinCE? It seems to be part of glibc... Kind Regards, Leonardo. ----- Ursprüngliche Mail ---- Von: Pedro Alves <pedro_alves-BwYwT0D5Mwdz4s462UR3lw@xxxxxxxxxxxxxxxx> An: Leonardo Weiss Chaves <humaita-/E1597aS9LQAvxtiuMwx3w@xxxxxxxxxxxxxxxx> CC: cegcc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx Gesendet: Freitag, den 20. Juli 2007, 16:01:45 Uhr Betreff: Re: AW: [Cegcc-devel] Building pthread. Leonardo Weiss Chaves wrote: > I am still not able to compile any kind of pthreads with cegcc/mingw32ce. > > I did some smaller modifications to the source of mingw32e and to > pthread-w32-2.8.0, and it almost compiles. But at the end I get lots of > undefined references. This is strange, since the compiler flag "-DWINCE" > should take care of this, for instance by using the errno hack you mentioned. > > I commented the following lines out on mingw32Ce files: > errno.h 12,13,14,109 > signal.h 12 > process.h 99,102 > You shouldn't do this. That include_next is there to make it as if the files didn't exist. Either provide your own versions of these files in the include path (-I), so the include_next picks them up, or don't include them in the first place: #ifndef _WIN32_WCE #include <errno.h> #endif or, #ifdef HAVE_ERRNO_H #include <errno.h> #endif or similar. > arm-wince-mingw32ce-g++ -DWINCE -D__CLEANUP_C -O3 -finline-functions -shared > -o pthreadGC2.dll attr.o barrier.o cancel.o cleanup.o condvar.o create.o > dll.o errno.o exit.o fork.o global.o misc.o mutex.o nonportable.o private.o > rwlock.o sched.o semaphore.o signal.o spin.o sync.o tsd.o version.o I don't see any libs being linked in here? Where is the -lws2 ? > condvar.o:condvar.c:(.text+0x184): undefined reference to `errno' > condvar.o:condvar.c:(.text+0x25c): undefined reference to `errno' > condvar.o:condvar.c:(.text+0x400): undefined reference to `errno' > condvar.o:condvar.c:(.text+0x5a0): undefined reference to `errno' > condvar.o:condvar.c:(.text+0x6f0): undefined reference to `errno' > condvar.o:condvar.c:(.text+0x848): more undefined references to `errno' follow > create.o:create.c:(.text+0x108): undefined reference to `_beginthread' > exit.o:exit.c:(.text+0x2c): undefined reference to `_endthread' > misc.o:misc.c:(.text+0x224): undefined reference to `ptw32_mcs_lock_acquire' > misc.o:misc.c:(.text+0x244): undefined reference to `ptw32_mcs_lock_release' > misc.o:misc.c:(.text+0x274): undefined reference to `ptw32_mcs_lock_release' > mutex.o:mutex.c:(.text+0x3c8): undefined reference to `ptw32_relmillisecs' > mutex.o:mutex.c:(.text+0x550): undefined reference to `ptw32_relmillisecs' > private.o:private.c:(.text+0xe4): undefined reference to `errno' > private.o:private.c:(.text+0x2b8): undefined reference to `_endthread' > private.o:private.c:(.text+0x4d4): undefined reference to `_endthread' > sched.o:sched.c:(.text+0x1c): undefined reference to `errno' > sched.o:sched.c:(.text+0x3c): undefined reference to `errno' > sched.o:sched.c:(.text+0xb4): undefined reference to `errno' > sched.o:sched.c:(.text+0x130): undefined reference to `errno' > semaphore.o:semaphore.c:(.text+0x14): undefined reference to `errno' > semaphore.o:semaphore.c:(.text+0x2c): more undefined references to `errno' > follow > semaphore.o:semaphore.c:(.text+0x32c): undefined reference to > `ptw32_relmillisecs' > semaphore.o:semaphore.c:(.text+0x3ec): undefined reference to `errno' > semaphore.o:semaphore.c:(.text+0x550): undefined reference to `errno' > semaphore.o:semaphore.c:(.text+0x61c): undefined reference to `errno' > semaphore.o:semaphore.c:(.text+0x6d4): undefined reference to `errno' Looks like you are missing some .o's in the link command line. Try to find where the 'int errno' is defined as opposed to just declared (extern int errno). Same for _beginthread/_endthread, they should be defined somewhere in the pthreads WinCE port, as WinCE doesn't provide those. > tsd.o:tsd.c:(.text+0x18): undefined reference to `WSAGetLastError' > tsd.o:tsd.c:(.text+0x38): undefined reference to `WSASetLastError' These come from ws2.dll, but you don't have it in the command line... (-lws2) Cheers, Pedro Alves __________________________________ Die etwas anderen Infos rund um das Thema Reisen. BE A BETTER WELTENBUMMLER! www.yahoo.de/clever
This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________ Cegcc-devel mailing list Cegcc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/cegcc-devel |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | WinCE Exception handling support in gcc: 00068, Danny Backx |
|---|---|
| Next by Date: | Re: Building pthread.: 00068, Danny Backx |
| Previous by Thread: | Re: Building pthread.i: 00068, Pedro Alves |
| Next by Thread: | Re: Building pthread.: 00068, Danny Backx |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |