This document said:"passing -g
to gcc
or g++"
. And "Note that the default CFLAGS
and CXXFLAGS
of the distro already contain -g
, "
My question is :
I build souce code a.c with myself gcc/make configfile.
first time: compile a.c with -O2,then get a1.bin
second time: compile a.c woth -O2 -g,then strip debug symbols.then get a2.bin
But i find a2.bin is slower then a1.bin.The performance of a2.bin is 5% slower.
Should a2.bin run as fast as a1.bin?(performance is same?)//Tomorrow i will provide the complete commands.
Can anyone give some advice?
I find that:rpmbuild run gcc one time with -g -O2,then get a.rpm and a.debuginforpm.
thanks.