[parsec-users] -static-libgcc

Christian Bienia cbienia at CS.Princeton.EDU
Sat Aug 15 18:30:35 EDT 2009


Hi Ef,

 

The option `-static' tries to link all libraries statically,
`-static-libgcc' only links the gcc runtime statically. Linking everything
statically can cause trouble because later versions of glibc dynamically
load additional parts of the library at runtime with libdl, no matter
whether the library has been linked statically or not. This means that on
systems with a different glibc version than the one linked into the binary,
the program will suddenly start using two potentially incompatible glibc
versions at the same time, which is a serious issue. Unfortunately glibc is
not properly supporting static linking anymore, so the `-static' flag of gcc
has really become a legacy option. On the other hand, you do want to link in
the gcc runtime statically because it has been changed with every major
release of gcc. It is very unlikely that the system you want to run your
binaries on just happens to have the same gcc version installed. If the
static linking business causes trouble, keep in mind you can always simply
copy the shared libraries together with the binaries if you want to run it
somewhere else.

 

Concerning canneal, I have reports that it builds and runs on Alpha machines
out of the box, so your compiler is probably too old. There should be no
syntax errors whatsoever.

 

- Chris

 

 

From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of ef
Sent: Saturday, August 15, 2009 6:00 PM
To: PARSEC Users
Subject: Re: [parsec-users] -static-libgcc

 

Whoops, I fixed the error for -static-libgcc, syntax mistake. Hopefully
someone can help me determine if there are any differences between -static
and -static-libgcc.

Also It seems these options dont work on my Alpha Compilers:
-Wl --hash-style=both -as-needed
Are these worth fixing? 




On Sat, Aug 15, 2009 at 2:22 PM, ef <snorlaxgb at gmail.com> wrote:

Hello,

I am trying to recompile Parsec 2.1 benchmarks, and Ive noticed there is a
new flag called -static-libgcc. Right now my target architecture is Alpha
for M5. My cross compiler does not reconize that option:

/parsec-2.1/config/gcc-alpha.bldconf: line 76: -static-libgcc: command not
found

Id like to know more about this flag -static-libgcc and wether its worth
trying to get added to my Compiler, as the reading Ive done so far on google
has left me up in the air.... Does anyone know if its possible to add this
feature to my Alpha Cross Compiler. Is it worth it also? As Ive only
successfully compiled a few Parsec M5 compatible benchmarks..
How different is this option compared to the --static flag, doesn't the
--static flag cover -static-libgcc anyways?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20090815/f98cafde/attachment-0001.htm>


More information about the parsec-users mailing list