patch to check ld

Phil Edwards pedwards@disaster.jaj.com
Mon Jul 31 13:17:00 GMT 2000


fche@redhat.com (Frank Ch. Eigler):
> Phil Edwards <pedwards@disaster.jaj.com> writes:
>
> > Say, during compiling, one would pass -On, and when linking, one would pass
> > -On -Ofinal.  The latter would pass on to the linker all those flags that
> > make sense for linking.  And if -Ofinal were passed during a compile-only
> > step, it would be ignored.
>
> But during a "compile-only step", when is the linker is invoked at all?

It wouldn't.  Thus, it would be ignored [by the compiler driver], e.g.,

   g++ -c -O2 -Ofinal blah.cc

g++ would ignore -Ofinal, and

   g++ -o kapucky -O2 -Ofinal blah.o

would use it in some manner.  (If the -O flags are being generated by a
make rule, then even the nonsense ones should be accepted and discarded,
like passing -L to a compile-only step.)

Just a thought; I doubt it'll happen.


Phil



More information about the Libstdc++ mailing list