Debugging, optimization and profiling - which happens at which stage(s) (compilation and link)
Tim Prince
n8tm@aol.com
Sun Aug 30 14:02:00 GMT 2009
Tim wrote:
> Thanks! It's indeed a clever way.
>
> Being still curious, I am waiting for some explanation on which happens at which stage.
>
-pg both inserts calls to profiling library functions at compile time,
and adds the corresponding libraries at link time, possibly also
substituting -pg built libraries for certain run-time libraries.
Certain compilers change run-time libraries to match options such as
-march, so, although those gcc options may affect only compiler
optimization passes, it needn't be that way forever.
More information about the Gcc-help
mailing list