2 # ---------------------
3 # Find nm and verify that it works.
6 if test "$HostOS" != "mingw32"; then
7 AC_CHECK_TARGET_TOOL([NM], [nm])
8 if test "$NM" = ":"; then
9 AC_MSG_ERROR([cannot find nm in your PATH])
12 if test "$HostOS" = "mingw32"
14 NmCmd=$(cygpath -m "$NM")
20 if test "$TargetOS_CPP" = "darwin"
22 AC_MSG_CHECKING(whether nm program is broken)
23 # Some versions of Xcode ship a broken version of `nm`. Detect and work
24 # around this issue. See : https://gitlab.haskell.org/ghc/ghc/issues/11744
25 nmver=$(${NM} --version | grep version | sed 's/ //g')
27 LLVMversion7.3.0|LLVMversion7.3.1)
29 echo "The detected nm program is broken."
31 echo "See: https://gitlab.haskell.org/ghc/ghc/issues/11744"
33 echo "Try re-running configure with:"
35 echo ' NM=$(xcrun --find nm-classic) ./configure'