[parsec-users] Building statically linked executables

Amittai Aviram amittai.aviram at yale.edu
Thu Oct 15 22:24:02 EDT 2009


On Oct 15, 2009, at 9:10 PM, Vivek Rane wrote:

> Due to a requirement in our simulator, I'm trying to statically link  
> the parsec benchmarks. I added a -static flag to LDFLAGS in  
> gcc.bldconf and gcc-pthreads.bldconf (I'm building with -c gcc- 
> pthreads). It worked with blackscholes, but I'm unable to coerce  
> bodytrack into building statically. What might I be missing? Any  
> pointers would be very helpful.
>
> Thanks,
> Vivek
>
>


Hi, Vivek!

If you are going to run the pthreads version of the parallel code, I  
believe that you need to add the following to your CXXFLAGS instead of  
just "-static" or "-static -pthread" or "-static -lpthread":

CXXFLAGS := $(CXXFLAGS) -static -Wl,--whole-archive -lpthread -Wl,--no- 
whole-archive

See this message:

http://sourceware.org/ml/libc-alpha/2007-10/msg00005.html

I am actually a little surprised that your blackscholes worked.  Were  
you using pthreads?

Best wishes,
Amittai

Amittai Aviram
Graduate Student in Computer Science
Yale University
646 483 2639
amittai.aviram at yale.edu
http://www.amittai.com



More information about the parsec-users mailing list