aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-11-08 11:22:17 +0100
committerTristan Gingold <tgingold@free.fr>2014-11-08 11:22:17 +0100
commit002b207d916c64b88a3bb691ee6c239139f49433 (patch)
treef8a71bab91f90b2536dd09a552e5a0b09fe56166 /configure
parent81a5560849a767b6eb1a536dacc43f475780c1e9 (diff)
downloadghdl-002b207d916c64b88a3bb691ee6c239139f49433.tar.gz
ghdl-002b207d916c64b88a3bb691ee6c239139f49433.tar.bz2
ghdl-002b207d916c64b88a3bb691ee6c239139f49433.zip
Add instructions for llvm (WIP).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure b/configure
index e869495e5..ca9baa096 100755
--- a/configure
+++ b/configure
@@ -12,12 +12,13 @@ libdirsuffix=lib/ghdl
libdirreverse=../..
gcc_src_dir=
gcc_version=unknown
+llvm_prefix=
build=
show_help=no
progname=$0
-subst_vars="CC GNATMAKE CFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir"
+subst_vars="CC GNATMAKE CFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_prefix"
# Find srcdir
srcdir=`dirname $progname`
@@ -49,6 +50,7 @@ for opt do
--prefix=*) prefix="$optarg";;
--srcdir=*) srcdir="$optarg";;
--with-gcc=*) gcc_src_dir="$optarg"; backend=gcc;;
+ --with-llvm=*) llvm_prefix="$optarg"; backend=llvm;;
-h|-help|--help) show_help=yes;;
*) echo "$0: unknown option $opt; try $0 --help"
exit 1
@@ -65,6 +67,7 @@ Options [defaults in brackets]:
--prefix=PREFIX install in PREFIX [$prefix]
--srcdir=SRCDIR source code path [$srcdir]
--with-gcc=DIR use gcc backend from DIR (needs gcc $gcc_version)
+ --with-llvm=DIR use llvm installed in DIR
EOF
exit 0
fi
@@ -105,6 +108,15 @@ if test $backend = gcc; then
fi
fi
+# For llvm backend, check llvm-config
+if test $backend = llvm; then
+ llvm_cmd="$llvm_prefix/bin/llvm-config --version"
+ if ! $llvm_cmd 2> /dev/null; then
+ echo "cannot run $llvm_cmd"
+ exit 1
+ fi
+fi
+
# Compute build machine
if test x$build = x; then
build=`$CC $CFLAGS -dumpmachine`