[commit: ghc] ghc-8.0: distrib: Fix libdw bindist check (23d60a5)

git at git.haskell.org git at git.haskell.org
Mon Sep 5 21:27:28 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/23d60a530e2013b643aaa2de96f8cbbe98feb64e/ghc

>---------------------------------------------------------------

commit 23d60a530e2013b643aaa2de96f8cbbe98feb64e
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Sun Sep 4 13:23:35 2016 -0400

    distrib: Fix libdw bindist check
    
    As reported in #12555 this code was terribly broken. Sadly, Autoconf was
    none-the-wiser. Thanks to @rwbarton for pointing this out.
    
    Test Plan: Test with libdw version newer and older and 0.158
    
    Reviewers: hvr, austin, rwbarton
    
    Reviewed By: rwbarton
    
    Subscribers: thomie, rwbarton, erikd
    
    Differential Revision: https://phabricator.haskell.org/D2510
    
    GHC Trac Issues: #12555
    
    (cherry picked from commit 05b497ece50f508526d0906f675bdb4c8109d46a)


>---------------------------------------------------------------

23d60a530e2013b643aaa2de96f8cbbe98feb64e
 distrib/configure.ac.in | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index c399352..d50ce86 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -91,17 +91,6 @@ dnl --------------------------------------------------------------
 FIND_LD([LdCmd])
 AC_SUBST([LdCmd])
 
-dnl ** Have libdw?
-dnl --------------------------------------------------------------
-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
 
@@ -150,6 +139,18 @@ dnl ** how to invoke `ar' and `ranlib'
 FP_PROG_AR_SUPPORTS_ATFILE
 FP_PROG_AR_NEEDS_RANLIB
 
+dnl ** Have libdw?
+dnl --------------------------------------------------------------
+dnl Check for a usable version of libdw/elfutils
+dnl Currently we need 0.158 or newer.
+BinDistNeedsLibdw=@UseLibdw@
+if test "x$BinDistNeedsLibdw" = "xYES" ; then
+  AC_CHECK_LIB(dw, dwfl_attach_state,
+    [UseLibdw=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_SETTINGS
 
 #



More information about the ghc-commits mailing list