Recommend more reliable recourse for broken nm
authorBen Gamari <ben@smart-cactus.org>
Thu, 28 Apr 2016 08:11:13 +0000 (10:11 +0200)
committerBen Gamari <ben@smart-cactus.org>
Thu, 28 Apr 2016 08:13:37 +0000 (10:13 +0200)
xcrun --find seems like the appropriate choice here. Thanks to Brandon
Allbery for suggesting this.

docs/users_guide/8.0.1-notes.rst
utils/deriveConstants/Main.hs

index 4db68d2..5b10a32 100644 (file)
@@ -24,8 +24,7 @@ performance improvements over the 7.10 branch.
     system to use the ``nm-classic`` command instead of Apple's new ``nm``
     implementation as the latter breaks POSIX compliance (see
     :ghc-ticket:`11744`). This can be done by passing something like
-    ``--with-nm=/Library/Developer/CommandLineTools/usr/bin/nm-classic`` to
-    ``configure``.
+    ``--with-nm=$(xcrun --find nm-classic)`` to ``configure``.
 
 Highlights
 ----------
index 6a050d3..6cd48d4 100644 (file)
@@ -693,7 +693,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
              Just 0x292 -> die $ "broken 'nm' detected, see https://ghc.haskell.org/ticket/11744.\n"
                               ++ "\n"
                               ++ "Workaround: You may want to pass\n"
-                              ++ "    --with-nm=$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm-classic\n"
+                              ++ "    --with-nm=$(xcrun --find nm-classic\n"
                               ++ "to 'configure'.\n"
              Just x     -> die ("unexpected value round-tripped for CONTROL_GROUP_CONST_291: " ++ show x)