]> git.pld-linux.org Git - packages/llvm.git/commitdiff
%if "<ver1>" >= "<ver2>" is lexicographical comparison, not version
authorJan Palus <atler@pld-linux.org>
Wed, 22 Jul 2020 16:10:48 +0000 (18:10 +0200)
committerJan Palus <atler@pld-linux.org>
Wed, 22 Jul 2020 16:10:48 +0000 (18:10 +0200)
fixes build with gcc 10 but also makes questionable other such
comparisons ie against %{_rpmversion}

llvm.spec

index 63b1747b41c9323b342637b48e4d701858a544a2..08e3ef778c22a4cf33308f6414dbfce5a50a9e5a 100644 (file)
--- a/llvm.spec
+++ b/llvm.spec
@@ -64,7 +64,7 @@ BuildRequires:        cmake >= 3.4.3
 BuildRequires: flex
 BuildRequires: gcc >= 5:3.4
 # gcc4 might be installed, but not current __cc
-%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
+%if %(rpmvercmp %{cc_version} 3.4 > /dev/null; test $? = 2 && echo 1 || echo 0)
 BuildRequires: __cc >= 3.4
 %endif
 BuildRequires: groff
This page took 0.265732 seconds and 4 git commands to generate.