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: pgpyVgiNw4erW.pgp
Description: PGP signature

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux