Switch default to LLVM/Clang 3.4

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sun Jun 22 20:58:53 UTC 2014


Hi all,

On 22.06.2014 19:19, Sylvestre Ledru wrote:
> I am planning to switch llvm defaults to llvm 3.4 (probably in a week).
>
> Could you check that your packages build again this release?
>
> Packages:
> clamav  haskell-llvm-base gambas3 ldc  lightspark  llvm-py
> vim-youcompleteme

I am sure that clamav works with llvm 3.4, because I wrote (not so long 
ago, just before the 3.4.1 release...) the patch to make it build 
against llvm 3.1-3.4.

*BUT* the current version of llvm-3.4 in sid is 3.4.2, not just 3.4.
It seems llvm upstream decided to change their version scheme, starting 
with 3.4.1, to contain three numbers instead of only two.
This breaks the expectations of clamav's configure script. :(
llvmver_int=`echo "$llvmver" | sed -e 's/\.//g' | sed -e 's/svn//g'`
I fixed this now in git:
llvmver_int=`echo "$llvmver" | sed -e 's/\([[0-9]]\)\.\([[0-9]]\).*/\1\2/g'`

I am pretty sure, this breaks other configure scripts as well.
haskell-llvm-base (gives 30402 instead of 304):
llvm_num_version="`echo $llvm_version | sed 's/svn$//' | tr . 0`"

gambas3 (gives 3.2 as major and 4.2 as minor versions):
llvm_major_version=`echo $LLVM_VERSION | sed 's/svn.*//g' | sed 
's/\([[0-9]]*\).\([[0-9]]*\)/\1/'`
llvm_minor_version=`echo $LLVM_VERSION | sed 's/svn.*//g' | sed 
's/\([[0-9]]*\).\([[0-9]]*\)/\2/'`

The others are probably not affected:
ldc (using CMAKE):
string(REGEX REPLACE "([0-9]+).*" "\\1" LLVM_VERSION_MAJOR 
"${LLVM_VERSION_STRING}" )
string(REGEX REPLACE "[0-9]+\\.([0-9]+).*[A-Za-z]*" "\\1" 
LLVM_VERSION_MINOR "${LLVM_VERSION_STRING}" )

lightspark (using CMAKE):
find_path(LLVM_3_0 NAMES llvm/Support/TargetSelect.h)
if(LLVM_3_0)
   set(LLVM_STRING_VERSION "3.0")
else()
   set(LLVM_STRING_VERSION "2.8")

llvm-py (using Python):
if llvm_version.startswith('3.3') or llvm_version.startswith('3.4'):

vim-youcompleteme (using CMAKE):
file (GLOB SYS_LLVM_INCLUDE_PATHS /usr/lib/llvm-3.*/include)


So thanks for this heads up, which made me double-check.
It would have been just so much nicer, if the version scheme wouldn't 
suddenly change after more than 10 years (and 5 days after I wrote 
clamav's configure check)!

Best regards,
Andreas



More information about the pkg-flash-devel mailing list