From fce919f080ccb4ddaa2b49a5d742dbfc346ed6e2 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 26 Nov 2018 02:06:03 +0100 Subject: Accept LLVM 7 in configure script. (cherry picked from commit 71075430f5b86b0104a8abc92987c88b00dccb68) --- configure | 61 +++++++++++++++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 8dc0afcab..5a2c56bcd 100755 --- a/configure +++ b/configure @@ -214,37 +214,38 @@ fi # For llvm backend, check llvm-config if test $backend = llvm; then - llvm_version=`"$llvm_config" --version 2>/dev/null` - if [ $? != 0 ]; then - echo "cannot run $llvm_config" - exit 1 - fi - if check_version 3.5 $llvm_version; then - llvm_be=llvm - elif check_version 3.6 $llvm_version || - check_version 3.7 $llvm_version || - check_version 3.8 $llvm_version; - then - echo "Debugging is not enabled with llvm $llvm_version" - llvm_be=llvm-nodebug + llvm_version=`"$llvm_config" --version 2>/dev/null` + if [ $? != 0 ]; then + echo "cannot run $llvm_config" + exit 1 + fi + if check_version 3.5 $llvm_version; then + llvm_be=llvm + elif check_version 3.6 $llvm_version || + check_version 3.7 $llvm_version || + check_version 3.8 $llvm_version || + false; then + echo "Debugging is not enabled with llvm $llvm_version" + llvm_be=llvm-nodebug # Tested with llvm 3.5, so assume 3.6, 3.7 and 3.8 - elif check_version 3.9 $llvm_version || - check_version 4.0 $llvm_version || - check_version 5.0 $llvm_version || - check_version 6.0 $llvm_version || - false; then - echo "Debugging is not enabled with llvm $llvm_version" - llvm_be=llvm4-nodebug - else - echo "Unhandled version llvm $llvm_version" - exit 1 - fi - # For llvm, the c++ compiler is used for linking so that the standard c++ - # library is included. However, the linker needs the no_compact_unwind - # flag because code generated by gcc is not compatible with compact unwind. - case "$build" in - *darwin*) LDFLAGS="$LDFLAGS -Wl,-no_compact_unwind" ;; - esac + elif check_version 3.9 $llvm_version || + check_version 4.0 $llvm_version || + check_version 5.0 $llvm_version || + check_version 6.0 $llvm_version || + check_version 7.0 $llvm_version || + false; then + echo "Debugging is not enabled with llvm $llvm_version" + llvm_be=llvm4-nodebug + else + echo "Unhandled version llvm $llvm_version" + exit 1 + fi + # For llvm, the c++ compiler is used for linking so that the standard c++ + # library is included. However, the linker needs the no_compact_unwind + # flag because code generated by gcc is not compatible with compact unwind. + case "$build" in + *darwin*) LDFLAGS="$LDFLAGS -Wl,-no_compact_unwind" ;; + esac fi # Define default file extensions for Windows or Linux-like systems and -- cgit v1.2.3