aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-02-12 09:23:56 +0100
committerTristan Gingold <tgingold@free.fr>2023-02-12 09:23:56 +0100
commit96088c08fd94edbeba26f4a67821ea62b5077605 (patch)
tree7f663881549a6034734fef74fa29c1b104f83636 /configure
parentbce7a19011080e04ac3becc39809453ea05dfd33 (diff)
downloadghdl-96088c08fd94edbeba26f4a67821ea62b5077605.tar.gz
ghdl-96088c08fd94edbeba26f4a67821ea62b5077605.tar.bz2
ghdl-96088c08fd94edbeba26f4a67821ea62b5077605.zip
ghdl: print llvm or gcc backend version with --version
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index 82e1f8aa2..9e1c5e284 100755
--- a/configure
+++ b/configure
@@ -24,6 +24,7 @@
ghdl_version="3.0.0-dev"
backend=mcode
+backend_version="none"
CC=${CC:-gcc}
CXX=${CXX:-clang++}
CFLAGS=${CFLAGS:--g}
@@ -60,7 +61,7 @@ show_help=no
progname=$0
subst_vars="CC CXX GNATMAKE ADA_FLAGS MAKE CFLAGS CXXFLAGS LDFLAGS build
-srcdir abs_srcdir prefix backend libdirsuffix libghdldirsuffix
+srcdir abs_srcdir prefix backend backend_version libdirsuffix libghdldirsuffix
incdirsuffix gcc_src_dir llvm_config llvm_be backtrace_lib
build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks
enable_gplcompat enable_libghdl libghdl_version ghdl_version
@@ -221,7 +222,7 @@ fi
if [ "$enable_libghdl" = true ]; then
libghdl_version="$srcdir/pyGHDL/__init__.py"
# Extract content between double quotes in __init__.py, to avoid false positives due to LF/CRLF mismatch.
- if [ "$ghdl_version" != "`sed -n 's/^__version__.*"\(.*\)".*/\1/gp' $libghdl_version`" ]; then
+ if [ "$ghdl_version" != `sed -n 's/^__version__.*"\(.*\)".*/\1/gp' $libghdl_version` ]; then
echo "Sorry, the version of $libghdl_version is not correct"
echo "update the version to: $ghdl_version"
echo "or use --disable-libghdl"
@@ -268,6 +269,7 @@ if test $backend = mcode; then
echo "WARNING: --with-backtrace-lib= ignored with mcode"
backtrace_lib=
fi
+ backend_version="none"
fi
# For gcc backend, check existing version
@@ -276,6 +278,7 @@ if test $backend = gcc; then
echo "cannot find gcc/BASE-VER in $gcc_src_dir"
exit 1
fi
+ backend_version=`cat $gcc_src_dir/gcc/BASE-VER`
if test "x$backtrace_lib" = x ; then
# Automatically use libbacktrace from gcc.
backtrace_lib="$prefix/$libghdldirsuffix/libbacktrace.a"
@@ -324,6 +327,7 @@ if test $backend = llvm; then
case "$build" in
*darwin*) LDFLAGS="$LDFLAGS -Wl,-no_compact_unwind" ;;
esac
+ backend_version="$llvm_version"
fi
# Define default file extensions for Windows or Linux-like systems and