Page MenuHomeFreeBSD

lang/ghc862: Create a port.
ClosedPublic

Authored by arrowd on Sat, Dec 1, 8:08 AM.

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

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

arrowd created this revision.Sat, Dec 1, 8:08 AM
arrowd added a comment.Sat, Dec 1, 8:18 AM

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

arrowd updated this revision to Diff 51463.Sat, Dec 1, 9:43 AM
  • Add to category Makefile.
arrowd updated this revision to Diff 51464.Sat, Dec 1, 9:50 AM

Try to fix messed rev.

arrowd updated this revision to Diff 51466.Sat, Dec 1, 11:48 AM
  • 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 ↗(On Diff #51466)

You can delete these lines

tcberner added inline comments.Sun, Dec 2, 9:05 AM
lang/ghc862/Makefile
1 ↗(On Diff #51466)

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

22 ↗(On Diff #51466)

^ 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 ↗(On Diff #51466)

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

arrowd updated this revision to Diff 51718.Fri, Dec 7, 3:46 PM
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.Sat, Dec 8, 10:13 AM
tcberner accepted this revision.Sat, Dec 8, 10:48 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.