diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2018-11-26 02:06:03 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2018-11-26 05:15:12 +0100 |
commit | fce919f080ccb4ddaa2b49a5d742dbfc346ed6e2 (patch) | |
tree | 039b26fa061afe3848be8cd001fb016d88f19786 /configure | |
parent | 534fd65645a676181f0500e8544fc6beebb93d54 (diff) | |
download | ghdl-fce919f080ccb4ddaa2b49a5d742dbfc346ed6e2.tar.gz ghdl-fce919f080ccb4ddaa2b49a5d742dbfc346ed6e2.tar.bz2 ghdl-fce919f080ccb4ddaa2b49a5d742dbfc346ed6e2.zip |
Accept LLVM 7 in configure script.
(cherry picked from commit 71075430f5b86b0104a8abc92987c88b00dccb68)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 61 |
1 files changed, 31 insertions, 30 deletions
@@ -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 |