[MacPorts] #64698: approach to fix Haskell (GHC) for PowerPC: some progress, ghc @7.6.3 builds for ppc but there is a bug to be fixed

MacPorts noreply at macports.org
Wed Feb 23 19:53:33 UTC 2022


#64698: approach to fix Haskell (GHC) for PowerPC: some progress, ghc @7.6.3 builds
for ppc but there is a bug to be fixed
---------------------------------+------------------------------
  Reporter:  barracuda156        |      Owner:  (none)
      Type:  enhancement         |     Status:  new
  Priority:  Normal              |  Milestone:
 Component:  ports               |    Version:  2.7.1
Resolution:                      |   Keywords:  powerpc, leopard
      Port:  ghc, ghc-bootstrap  |
---------------------------------+------------------------------

Comment (by barracuda156):

 Replying to [comment:29 kencu]:
 > BTW, if you have an hour and want to see this working on PPC to wet your
 whistle, this is on a G4 iMac:
 >
 > {{{
 > $ uname -a
 > Linux debianimacppc32 5.15.0-2-powerpc #1 Debian 5.15.5-2 (2021-12-18)
 ppc GNU/Linux
 >
 > $ which ghc
 > /usr/bin/ghc
 >
 > $ ghc -v
 > Glasgow Haskell Compiler, Version 8.8.4, stage 2 booted by GHC version
 8.8.4
 > Using binary package database: /usr/lib/ghc/package.conf.d/package.cache
 > package flags []
 > loading package database /usr/lib/ghc/package.conf.d
 > wired-in package ghc-prim mapped to ghc-prim-0.5.3
 > wired-in package integer-wired-in mapped to integer-gmp-1.0.2.0
 > wired-in package base mapped to base-4.13.0.0
 > wired-in package rts mapped to rts
 > wired-in package template-haskell mapped to template-haskell-2.15.0.0
 > wired-in package ghc mapped to ghc-8.8.4
 > *** Deleting temp files:
 > Deleting:
 > *** Deleting temp dirs:
 > Deleting:
 > ghc: no input files
 > Usage: For basic information, try the `--help' option.
 > }}}

 Awesome! If you get a chance, could you try building for `powerpc-apple-
 darwin` target on Debian PPC?

 8.8.4 won’t work unless patched, but 8.6.5 has `powerpc-apple-darwin` code
 still.

 For example, in `ghc-8.6.5/compiler/codeGen/CodeGen/Platform.hs`:

 {{{
 import qualified CodeGen.Platform.ARM        as ARM
 import qualified CodeGen.Platform.ARM64      as ARM64
 import qualified CodeGen.Platform.PPC        as PPC
 import qualified CodeGen.Platform.PPC_Darwin as PPC_Darwin
 import qualified CodeGen.Platform.SPARC      as SPARC
 import qualified CodeGen.Platform.X86        as X86
 import qualified CodeGen.Platform.X86_64     as X86_64
 import qualified CodeGen.Platform.NoRegs     as NoRegs
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/64698#comment:30>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list