> I have created a m5threads static linkable library for Sparc, with the files
> available in the m5 repository. I used the Sparc compiler available in the
> m5 website.
> The thing is: when I link my multithreaded helloworld app with this lib, I
> get the following error:
>
> eberl...@bellatrix:~/UFSC/Wannabe/helloworld$ sparc64-unknown-linux-gnu-g++
> -static -L. -lm5pthread hello.cpp -o hello
> /tmp/ccfh1vud.o(.text+0x2b0): In function `main':
> : undefined reference to `pthread_join'
> collect2: ld returned 1 exit status

I think your link order is bad.  generally, -l options need to come
after object files, otherwise, the linker doesn't know to pull out the
relevant functions.  (The linker processes files in order.)
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to