[Pkg-haskell-maintainers] Bug#616635: [GHC] #4999: build fails on powerpc: error: 'ObjectCode' has no member named 'misalignment'

GHC cvs-ghc at haskell.org
Sun Apr 3 13:38:54 UTC 2011


#4999: build fails on powerpc:   error: 'ObjectCode' has no member named
'misalignment'
----------------------------------+-----------------------------------------
  Reporter:  nomeata              |          Owner:         
      Type:  bug                  |         Status:  new    
  Priority:  high                 |      Milestone:  7.2.1  
 Component:  Runtime System       |        Version:  7.0.2  
Resolution:                       |       Keywords:         
  Testcase:                       |      Blockedby:         
Difficulty:                       |             Os:  Linux  
  Blocking:                       |   Architecture:  powerpc
   Failure:  Building GHC failed  |  
----------------------------------+-----------------------------------------
Changes (by igloo):

  * owner:  igloo =>
  * priority:  highest => high
  * status:  patch => new


Comment:

 OK, I took a look at the patch. It seems to me that a smaller fix for the
 build problem would be to only add on `oc->misalignment` in
 `ocFlushInstructionCache` on darwin. It may also be necessary to include
 this part of the patch:
 {{{
 -#if defined(linux_HOST_OS    ) || defined(freebsd_HOST_OS) || \
 -    defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
 -    defined(openbsd_HOST_OS  ) || \
 -    ( defined(darwin_HOST_OS ) && !defined(powerpc_HOST_ARCH) ) || \
 -    defined(kfreebsdgnu_HOST_OS)
 -/* Don't use mmap on powerpc-apple-darwin as mmap doesn't support
 +#if !defined(powerpc_HOST_ARCH) && \
 +    (   defined(linux_HOST_OS    ) || defined(freebsd_HOST_OS) || \
 +        defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
 +        defined(openbsd_HOST_OS  ) || defined(darwin_HOST_OS ) || \
 +        defined(kfreebsdgnu_HOST_OS) )
 +/* Don't use mmap on powerpc_HOST_ARCH as mmap doesn't support
 }}}
 I'm not sure if there are any other build problems, and I can't easily
 test it, so I haven't made the change myself.

 The other changes make PPC/Linux use `misalignment`, but then always set
 `misalignment` to 0. I don't know what the deal is with
 `machoGetMisalignment`; looking at the current code it looks like it is an
 OS X thing rather than a PPC thing (e.g. it has a x86_64_HOST_ARCH ||
 powerpc64_HOST_ARCH condition in it).

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





More information about the Pkg-haskell-maintainers mailing list