patch to check ld

Ulrich Drepper drepper@redhat.com
Mon Jul 31 09:21:00 GMT 2000


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   `------------------------


More information about the Libstdc++ mailing list