[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] uclinux and pthreads
I am using microblaze linux as part of a job as a research position at the University of Guelph, Canada.
I have been having a lot of troulbe getting even trivial code samples to compile with mb-gcc that rely on various multi-threading facilities. To briefly summarize..
1) A main.c file with just #include <setjmp.h> and an empty main function will not compile
2) There are a number of functions that will compile, but not link. For example, sigprocmask and the pthread api seem to exist in the header files, but on compiling
I get link errors and I cannot find the functions anywhere in microblazes lib directory despite desperate searching with mb-nm.
Before I write verbose emails with these problems as bug reports... Does microblaze uclinux have a pthread_api built in? Is setjmp.h meant to work?
I am using the tools in microblaze-elf-tools-20050308.tar.gz on redhat linux 9 as my development kit following the instructions in readme.txt. I can successfully compile the
trivial
int main(void)
{
return 1;
}
example as demonstrated in the readme, but not much else.
Do multi-threading facilities exist for microblaze uclinux? If so, any idea of what I am doing wrong? I just make the source code and compile with mb-gcc on redhat right now.
If these facilities exist, here is an example of the kind of errors I am getting..
[root@localhost root]# cat signal.c
#include <signal.h>
#include <stdlib.h>
int test(void) {
sigprocmask( SIG_BLOCK, NULL, NULL );
return 1;
}
[root@localhost root]# mb-gcc signal.c
/usr/local/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/../../../../microblaze/lib/crt0.o: In function `_start1':
/usr/local/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/../../../../microblaze/lib/crt0.o(.text+0xc4): undefined reference to `main'
/tmp/ccVbpDTT.o: In function `test':
/tmp/ccVbpDTT.o(.text+0x1c): undefined reference to `sigprocmask'
[root@localhost root]#
Thanks, Joshua Moore-Oliva
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/