[Samba] Re: Very HUGE binaries!?

Urs Rau urs.rau at uk.om.org
Tue Mar 29 09:57:49 GMT 2005

Urs Rau wrote:

 > It would appear that $RPM_OPT_FLAGS is the one that introduces 
"CFLAGS=-O2 -g -march=i386 -mcpu=i686"
 > Any advice on the cleanest way to reduce the size of the binaries and 
not have them compiled with "-g"?

For now I have added an "ugly" 2-liner to the beginning of the %prep and
%build sections. (in case rpm builders jump straight to the %build section)

# avoid building huge rpms
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed s/-g//`

I know I could have either reset my system wide rpmrc or set my own
~/.rpmrc, but I wanted to make sure that anybody that uses my spec file
to rebuild the rpm would also get small binaries and not have to
remember to set their own system or personal rpmrc

Is this all one can do, it feels like an ugly "hack"?


Urs Rau

More information about the samba mailing list