Re: Rpmbuild SPEC file - variable declaration

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

 





Am 13.09.2015 um 15:39 schrieb arnaud gaboury:
On Sun, Sep 13, 2015 at 2:16 PM, Rex Dieter <rdieter@xxxxxxxxxxxx> wrote:
arnaud gaboury wrote:

When declaring a variable value,  I wonder if the any difference/best
practice between these methods:

export VAR=MyValue
%{define} VAR MyValue
%{global} VAR MyValue

best practice is to use global, it is explicitly mentioned here:
https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define

Very good. TY for short and precise answer.

Now, for build flags macros and variables, I want to add some options
to the default one. I am not sure how to add options in a clean way.
These extra flags are used because I build with Intel Compiler:

export CFFLAGS= '-xHost -mavx -fp-model precise'
%configure
    CFFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
    ........

Is above the the best way?

no

* there is no reason to mention CFLAGS in %configure again
* you don't want the default macro at the end because
  it would probably override your overrides
* export CFFLAGS="%optflags -xHost -mavx -fp-model precise"

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux