[Fedora-packaging] Macro %{optflags}

Andrea Musuruane musuruan at gmail.com
Thu Sep 16 13:59:32 UTC 2010


On Thu, Sep 16, 2010 at 3:49 PM, Sergio Belkin <sebelk at gmail.com> wrote:
> Well I am really newbie packaging,
>
> As rpm command:
> rpm --eval "%{optflags}"
> -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686
> -mtune=atom -fasynchronous-unwind-tables
>
> but Makefile contains:
>
> CXXFLAGS=-ansi  -Wall -Wno-deprecated
>
> So, what of these flags are commited?

Probably the ones in the Makefile. You must always check the output
from make to see what flags are used. It is your duty to communicate
%{optflags} to Makefile. Often patching is required, other times it is
sufficient to set the appropriate flags when calling make.

Bye,

Andrea.


More information about the packaging mailing list