
#9549: deriveConstants fails on OpenBSD -------------------------------------+------------------------------------- Reporter: roland | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.9 System | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: OpenBSD | Difficulty: Unknown Type of failure: Building | Blocked By: GHC failed | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by roland): Removing the -P option (and adapting the pattern matching) in DeriveConstants.hs yields the following error: {{{ "inplace/bin/ghc-stage1" -static -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist- ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -this-package- key rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o rts/HeapStackCheck.cmm:97:18: parse error on input `[' }}} Apparently this is due to a wrong value being derived for REP_bdescr_link: {{{ $ grep '#define REP_bdescr_link' ./includes/dist- derivedconstants/header/DerivedConstants.h #define REP_bdescr_link b0 }}} ...which in turn comes from nm's output: {{{ $ nm ./includes/dist-derivedconstants/header/tmp.o | grep REP_bdescr_link 00000001 C derivedConstantREP_bdescr_link }}} On the other hand, objdump outputs 9 instead of 1: {{{ $ objdump -t ./includes/dist-derivedconstants/header/tmp.o | grep REP_bdescr_link 0000000000000009 O *COM* 0000000000000001 derivedConstantREP_bdescr_link }}} With this value (9), REP_bdescr_link is derived as 'b64' instead of 'b0' and thus HeapStackCheck.cmm compiles. No matter what options are passed to OpenBSD's nm, it won't output '9' for derivedconstantREP_bdescr_link. Does this have to be handled differently on different systems or is there another way? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9549#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler