This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch to check ld


Jason Merrill <jason@redhat.com> writes:

> That seems silly.  Under what circumstances would you want to compile
> with optimization but link without or vice versa?  Seems to me that a
> -O on the compiler link command line should pass through to the
> linker, though perhaps only for n>1.

In almost all situations but those when you are creating a final
binary.  The linke can take *significantly* longer if you specify -O1.
On the other hand, compiling without -O might even make the
compilation process slower due to the amount of code generated.  Since
gcc does not perform dead code analysis wiht -O I at least almost
always at least use -O.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]