Page MenuHomeFreeBSD

lang/ghc: port to powerpc64
ClosedPublic

Authored by arrowd on Jan 18 2019, 11:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 3:34 AM
Unknown Object (File)
Mon, Mar 11, 4:38 AM
Unknown Object (File)
Feb 23 2024, 5:51 PM
Unknown Object (File)
Feb 23 2024, 5:14 PM
Unknown Object (File)
Feb 9 2024, 11:49 AM
Unknown Object (File)
Feb 8 2024, 12:44 PM
Unknown Object (File)
Jan 27 2024, 5:13 PM
Unknown Object (File)
Jan 18 2024, 6:54 PM
Subscribers

Details

Summary

bootstrap for 12.0 available here http://mikael.urankar.free.fr/FreeBSD/powerpc64/ghc-8.6.3-boot-powerpc64-freebsd.tar.xz

Patches come from https://gitlab.haskell.org/trommler/ghc/commits/wip/T15916
Most of them are already commited upstream.

these 2 patches are not yet committed:
https://ghc.haskell.org/trac/ghc/ticket/15411 (Disable-unboxed-arrays.patch)
https://gitlab.haskell.org/trommler/ghc/commit/19731a77ed203870f76a53eaf01758efbb5144d3
For the record, upstream PR for FreeBSD/ppc64: https://ghc.haskell.org/trac/ghc/ticket/15916

Test Plan

ok on 12.0 ppc64, 8.6.2 and 8.6.3 (the 8.4.x branch is too old)
ok on amd64

the 'llvm backend' is broken (not sure if it's supposed to work, I'll submit a pr upstream)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mikael retitled this revision from lang/ghc: WIP port to powerpc64 to lang/ghc: port to powerpc64.
mikael edited the summary of this revision. (Show Details)
mikael edited the test plan for this revision. (Show Details)
lang/ghc/bsd.ghc.mk
13 ↗(On Diff #53037)

Why do we need that?

lang/ghc/Makefile
21 ↗(On Diff #53037)

Why +=?

lang/ghc862/Makefile
21 ↗(On Diff #53037)

Why +=?

lang/ghc/Makefile
21 ↗(On Diff #53037)

I don't know, it seems weird to have ONLY_FOR_ARCHS= powerpc64, it looks like the port is restricted to ppc64 until you look at bsd.ghc.mk

lang/ghc/bsd.ghc.mk
13 ↗(On Diff #53037)

I need a recent compiler, I probably just need compiler:c11 (or put use_gcc in the ppc64 'if block')

lang/ghc/Makefile
18 ↗(On Diff #53111)

^ what?

lang/ghc/bsd.ghc.mk
8 ↗(On Diff #53111)

^ why not add powerpc64 here? instead having that confusing line in lang/ghc/Makefile

lang/ghc/Makefile
18 ↗(On Diff #53111)

mat didn't like the ONLY_FOR_ARCHS+= ppc64 notation.
you don't like ONLY_FOR_ARCHS= ppc64
should I remove O_F_A in bsd.ghc.mk and list the allowed arches in each Makefile?

lang/ghc/bsd.ghc.mk
8 ↗(On Diff #53111)

It's only for ghc-8.6.x

lang/ghc/Makefile
18 ↗(On Diff #53111)

I did not say I did not liked it, I asked why, because the variable was not set before, and doing += means you are adding to it, which was weird, because it was not defined before.

You should add a comment saying other archs are added later, because it looks weird like this.

This revision is now accepted and ready to land.Jan 29 2019, 7:26 PM
arrowd edited reviewers, added: mikael; removed: arrowd.

Rework ONLY_FOR_ARCHS handling.

This revision now requires review to proceed.Feb 26 2019, 11:18 AM
lang/ghc/bsd.ghc.mk
183 ↗(On Diff #54412)

I wonder if this should not be changed to positive tests with the architectures that actually need this instead of excluding the ones that do not.

239–240 ↗(On Diff #54412)

Same here.

arrowd marked 2 inline comments as done.

Simplify checks.

I want to note that this Diff was about adding powerpc64 support to lang/ghc. It is seems to be moving into "refactor bsd.ghc.mk" direction now. I admit there is much to be done here, but it can be done iteratively and later.

This revision is now accepted and ready to land.Feb 26 2019, 12:12 PM
This revision now requires review to proceed.Mar 1 2019, 5:50 AM
lang/ghc/bsd.ghc.mk
91 ↗(On Diff #54569)

For a future revision, couldnt we do something like

_BOOT_GHC_VESRSION_amd64= 8.6.4
_BOOT_GHC_VESRSION_i386=8.6.4
[...]
_BOOT_GHC_VERSION_${ARCH}?=8.4.3
BOOT_GHC_VERSION=${_BOOT_GHC_VERSION_${ARCH}}

You seem to have forgotten adjusting ONLY_FOR_ARCHS :-)

I've fixed that locally and will see what happens overnight.

You seem to have forgotten adjusting ONLY_FOR_ARCHS :-)

Hum? Where?

lang/ghc/bsd.ghc.mk
8 ↗(On Diff #54571)

^ this seems to breaks it:

you cannot include bsd.port[.pre].mk twice

Bring IGNORE= line back to its place, because checking for OSVERSION at the
top requires including bsd.port.pre.mk, but it should be included after all
other variables are set.

Hum? Where?

OK, I understand it now. The assingments were confusing.

looks good to me again

This revision is now accepted and ready to land.Mar 4 2019, 5:06 AM
This revision was automatically updated to reflect the committed changes.