[parsec-users] Building statically linked executables

Vivek Rane vrane at seas.upenn.edu
Thu Oct 15 23:28:27 EDT 2009


----- Message from amittai.aviram at yale.edu ---------
     Date: Thu, 15 Oct 2009 22:24:02 -0400
     From: Amittai Aviram <amittai.aviram at yale.edu>
Reply-To: PARSEC Users <parsec-users at lists.cs.princeton.edu>
  Subject: Re: [parsec-users] Building statically linked executables
       To: PARSEC Users <parsec-users at lists.cs.princeton.edu>


>
> 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
>
> _______________________________________________
> parsec-users mailing list
> parsec-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
>


----- End message from amittai.aviram at yale.edu -----

Adding a --static to the CXXFLAGS in both bldcfg files did the trick!  
Thanks a ton! :)

- Vivek


More information about the parsec-users mailing list