[GHC] #11744: Latest Xcode update violates POSIX compliance of `nm -P`

GHC ghc-devs at haskell.org
Thu Apr 28 05:53:39 UTC 2016


#11744: Latest Xcode update violates POSIX compliance of `nm -P`
---------------------------------+----------------------------------------
        Reporter:  hvr           |                Owner:
            Type:  bug           |               Status:  new
        Priority:  highest       |            Milestone:
       Component:  Build System  |              Version:
      Resolution:                |             Keywords:
Operating System:  MacOS X       |         Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown  |            Test Case:
      Blocked By:                |             Blocking:
 Related Tickets:                |  Differential Rev(s):  phab:D2113
       Wiki Page:                |
---------------------------------+----------------------------------------

Comment (by ilovezfs):

 Unsurprisingly, especially since the bug is in the upstream LLVM code,
 it's not fixed in 7.3.1.

 However, this may be a relatively simple workaround until it's fixed. On
 OS X, these all appear to have the same output:


 With Xcode >= 7.3,
 {{{
 nm $k | awk '{ print $NF" "$2" "$1" 0" }'
 llvm-nm $k | awk '{ print $NF" "$2" "$1" 0" }'
 nm-classic $k | awk '{ print $NF" "$2" "$1" 0" }'
 nm-classic -P $k
 }}}

 With Xcode < 7.3,
 {{{
 nm $k | awk '{ print $NF" "$2" "$1" 0" }'
 nm -P $k
 }}}


 So

 {{{
 if darwin, `nm $k | awk '{ print $NF" "$2" "$1" 0" }'` else `nm -P`
 }}}

 should give the same output regardless of platform or Xcode version.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11744#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list