Page MenuHomeFreeBSD

lang/ghc862: Create a port.
ClosedPublic

Authored by arrowd on Dec 1 2018, 8:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 19, 2:08 AM
Unknown Object (File)
Tue, Mar 19, 2:08 AM
Unknown Object (File)
Tue, Mar 19, 2:08 AM
Unknown Object (File)
Tue, Mar 19, 2:08 AM
Unknown Object (File)
Tue, Mar 19, 2:08 AM
Unknown Object (File)
Tue, Mar 19, 2:08 AM
Unknown Object (File)
Tue, Mar 19, 2:08 AM
Unknown Object (File)
Tue, Mar 19, 1:52 AM
Subscribers

Details

Summary

Add a port for GHC 8.6.2. It isn't going to be a default GHC.
Depends on D18378.

Test Plan

poudriere testport -j {rel11,rel11x86,cur13,rel12x86} && compile simple hellow world app

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 21293
Build 20628: arc lint + arc unit

Event Timeline

I forgot to add it to category Makefile, but can't update the revision now, for some reason:

>>> [28] <http> https://reviews.freebsd.org/api/differential.creatediff
<<< [28] <http> 61,157,363 us

[2018-12-01 08:17:07] EXCEPTION: (HTTPFutureCURLResponseStatus) [cURL/92] (https://reviews.freebsd.org/api/differential.creatediff) The cURL library raised an error while making a request. You may be able to find more information about this error (error code: 92) on the cURL site: http://curl.haxx.se/libcurl/c/libcurl-errors.html# at [<phutil>/src/future/http/HTTPSFuture.php:408]
arcanist(), phutil()
  #0 HTTPSFuture::isReady() called at [<phutil>/src/future/Future.php:37]
  #1 Future::resolve(NULL) called at [<phutil>/src/future/FutureProxy.php:34]
  #2 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:64]
  #3 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:519]
  #4 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

I forgot to add it to category Makefile, but can't update the revision now, for some reason:

>>> [28] <http> https://reviews.freebsd.org/api/differential.creatediff
<<< [28] <http> 61,157,363 us

[2018-12-01 08:17:07] EXCEPTION: (HTTPFutureCURLResponseStatus) [cURL/92] (https://reviews.freebsd.org/api/differential.creatediff) The cURL library raised an error while making a request. You may be able to find more information about this error (error code: 92) on the cURL site: http://curl.haxx.se/libcurl/c/libcurl-errors.html# at [<phutil>/src/future/http/HTTPSFuture.php:408]
arcanist(), phutil()
  #0 HTTPSFuture::isReady() called at [<phutil>/src/future/Future.php:37]
  #1 Future::resolve(NULL) called at [<phutil>/src/future/FutureProxy.php:34]
  #2 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:64]
  #3 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:519]
  #4 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

you can rebuild curl without http2 support, that seems to have fixed arc for me

  • Add to category Makefile.
  • lang/ghc862: Create a port.
  • Add to category Makefile.
  • Add INTEGER_LIBRARY = %%INTEGER_LIBRARY%% to the build.mk template.

Make sure this is an svn cp of lang/ghc

extra-patch-aclocal.m4 doesn't apply correctly on arm. The arm part was merged upstream. Only the last hunk is needed (AC_DEFUN([FIND_LD])

The arm patch was merged upstream : https://github.com/ghc/ghc/commit/297879a78cc6ca4c27afb0cc863c8796b60da6e1
patch-configure is not needed anymore.

lang/ghc862/files/patch-llvm-targets
7–9

You can delete these lines

lang/ghc862/Makefile
1

^ this you can drop now. The svn copy is only for the history of the file. But you created it (I assume).

22

^ this could probably go in the shared bsd.ghc.mk file, right? (at a later stage)

ghci with DYNAMIC option is fixed on aarch64

root@tegra-x1: ~ pkg info -f ghc862 | grep DYNAMIC
        DYNAMIC        : on

root@tegra-x1: ~ ghci-8.6.2 
GHCi, version 8.6.2: http://www.haskell.org/ghc/  :? for help
Prelude> let x = 42 in x / 9
4.666666666666667
Prelude>
lang/ghc862/Makefile
26

We'll need 2 versions of llvm, one for the bootstrap (ghc-8.4 requires llvm50) and one for ghc-8.6 (llvm60)

arrowd marked an inline comment as done.
  • Remove extraneous patches. Add support for BOOT_LLVM_VERSION.
This revision is now accepted and ready to land.Dec 8 2018, 10:13 AM

Looks good to me with the created-by and svn-cp change.

Please prepare a followup for all he ghc-ports to address the order of the first block:
https://www.freebsd.org/doc/en/books/porters-handbook/porting-order.html#porting-order-portname

This revision was automatically updated to reflect the committed changes.