Re: Defining build options based on available compiler version

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

 



On Sat, 30 Jul 2011 19:44:41 +0300
Jussi Lehtola wrote:

> Hi,
> 
> 
> I tried using 
>  %global gccver %(gcc -dumpversion)
>  %if %{gccver} >= 4.6.0
>   foo here
>  %endif
> 
> to conditionalize usage of quadruple precision support in a spec file
> that ships on multiple distros, but the comparison gives the error
> 
>  parseExpressionBoolean returns -1
> 
> Is there a way to check if the gcc version is sufficient with some rpm
> macro?

Using python for parsing seems to work, but it looks a bit weird ;)

%global true_or_false %(python -c "print('%{gccver}' >= '4.6.0')")
%if %{true_or_false} == "True"
echo "true"
%else
echo "false"
%endif

Hope that helps,
	Thomsa
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[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