[commit: ghc] ghc-8.0: libdw: More precise version check (6554dc6)
git at git.haskell.org
git at git.haskell.org
Sun Apr 17 09:55:54 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/6554dc60304bbd4b2edb93be7e1658bff237e067/ghc
>---------------------------------------------------------------
commit 6554dc60304bbd4b2edb93be7e1658bff237e067
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Fri Apr 15 11:43:41 2016 +0200
libdw: More precise version check
Test Plan: Try configure in an environment with older `libdw`
Reviewers: hvr, austin
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2103
GHC Trac Issues: #11820
(cherry picked from commit e9ad48935fa48aa32dc39a55512168ba5f5bdbd2)
>---------------------------------------------------------------
6554dc60304bbd4b2edb93be7e1658bff237e067
configure.ac | 9 ++++++++-
distrib/configure.ac.in | 10 ++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8536d93..f7c2f33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1068,7 +1068,14 @@ if test "$use_large_address_space" = "yes" ; then
AC_DEFINE([USE_LARGE_ADDRESS_SPACE], [1], [Enable single heap address space support])
fi
-AC_CHECK_LIB(dw, dwfl_begin, [HaveLibdw=YES], [HaveLibdw=NO])
+dnl ** Have libdw?
+dnl --------------------------------------------------------------
+AC_ARG_ENABLE(libdw,
+ [AC_HELP_STRING([--enable-dwarf-unwind],
+ [Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])],
+ [AC_CHECK_LIB(dw, dwfl_attach_state, [HaveLibdw=YES], [HaveLibdw=NO])],
+ [HaveLibdw=NO]
+)
AC_SUBST(HaveLibdw)
if test -n "$SPHINXBUILD"; then
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index 0f68a52..c399352 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -93,8 +93,14 @@ AC_SUBST([LdCmd])
dnl ** Have libdw?
dnl --------------------------------------------------------------
-AC_CHECK_LIB(dw, dwfl_begin, [HaveLibdw=YES], [HaveLibdw=NO])
-AC_SUBST(HaveLibdw)
+dnl Check for a usable version of libdw/elfutils
+dnl Currently we need 0.158 or newer.
+BinDistNeedsLibdw=@HaveLibdw@
+if test "x$BinDistNeedsLibdw" = "xyes" ; then
+ AC_CHECK_LIB(dw, dwfl_attach_state, [HaveLibdw=YES],
+ [AC_MSG_ERROR([Binary distribution was built with libdw support but target system doesn't have supported libdw version (needs at least 0.158)])]
+ )];
+fi
FP_GCC_VERSION
AC_PROG_CPP
More information about the ghc-commits
mailing list