thread support on arm-gcc
Etienne Faure
Etienne.Faure@lip6.fr
Fri Jun 20 10:09:00 GMT 2003
Hello,
I am trying to build a cross gcc for an arm-elf target, using a Linux
host.
I use binutils2.13.2.1
gcc-2.95.3,
and newlib-1.11.0.
I can obtain a running gcc, but I don't succeed in activating the
multithread support.
here are my configuration options:
binutils:
./configure --target=$TARGET --prefix=$PREFIX
where TARGET=arm-elf and PREFIX=i686-pc-linux-gnu/$TARGET
bootstrap gcc:
./configure --target=$TARGET --prefix=$PREFIX \
--without-headers --with-newlib
Newlib:
./configure --target=$TARGET --prefix=$PREFIX \
--enable_threads=yes
I also tried --enable_threads=posix or --enable_threads=threads
gcc:
./configure --target=$TARGET --prefix=$PREFIX \
--enable-threads=posix
also tried --enable-threads=threads, but the result seems to be the same
as --enable-threads=single
The build process goes with no error but when i try to compile a
multithread program, it fails:
#include<pthread.h> is found, cpp does not complain about that.
pthread_t tid; syntax error near... pthread_t does not exist.
After looking at the pthread.h file I discovered that I can add
-D_POSIX_THREADS -D__rtems__ to the gcc options. this way i get an
object file, but the linker complains that it cannot find lpthread, and
effectively, there is no libpthread.a anywhere.
So did I do something wrong, or is there a problem to have a multithread
support for the arm?
Thanks for any help.
--
------------------------------
FAURE Etienne
etienne.faure@asim.lip6.fr
65-66 403
------------------------------
More information about the Gcc-help
mailing list