Re: building i386.rpm packages from src.rpm with -O0 instead -O2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pawel wrote:
> Could You tell me whether is there any generic way to build RPM
> package (together with its *-debuginfo package) that would be
> compiled with -O0 instead of (usual) -02.

I can think of a few ways you could do this.  I'm not sure which way
is best in general or for your particular needs.

You could set the CFLAGS environmental variable to -O0 or you could
set the __global_cflags or optflags definition in your rpm config (or
in the spec file or on the command line).

If you use 'CFLAGS="-O0" rpmbuild -bb package.spec' it will work,
though you won't get some of the other flags that are defined in the
%optflags and %__global_cflags by rpm.  You can see what those things
default to by using 'rpm --showrc'.  My i386 FC6 install has these:

optflags: %{__global_cflags} -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables
__global_cflags: -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4

Hope that gets you started in the right direction (and/or prompts
someone else here to chime in with additions and corrections :).

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
======================================================================
Money can't buy happiness, but it sure makes living in misery easier.

Attachment: pgpvCspWOZvmz.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux