Defining build options based on available compiler version

Jussi Lehtola jussilehtola at fedoraproject.org
Sat Jul 30 16:44:41 UTC 2011


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?
-- 
Jussi Lehtola
Fedora Project Contributor
jussilehtola at fedoraproject.org


More information about the devel mailing list