[CentOS-devel] a question about rpmbuild command

Wed Dec 4 15:51:32 UTC 2013
wk <304702903 at qq.com>



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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20131204/413889cb/attachment-0004.html>