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


Phil Edwards <pedwards@disaster.jaj.com> writes:

> I could see the linker's -On only being turned on at the compiler's
> -O(n+delta), but (n+delta) would probably still be used for all the object
> files, not just the final step.
> 
> Maybe gcc needs an -Ofinal to do things that only make good sense when
> creating a binary (or a library).

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.

And perhaps there should be an -flink-gc option that would imply
-ffunction-sections -fdata-sections -fvtable-gc -Wl,--gc-sections.

Jason

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