Bug 252166 - lang/ghc:fails to build on arm
Summary: lang/ghc:fails to build on arm
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL: http://ampere2.nyi.freebsd.org/data/h...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-26 17:27 UTC by Mikael Urankar
Modified: 2021-02-12 10:13 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (haskell)


Attachments
v0 (854 bytes, patch)
2020-12-26 17:27 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2020-12-26 17:27:58 UTC
Created attachment 220954 [details]
v0

errors:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM 9

/tmp/ghc65642_0/ghc_1.s:245:5: error:
     error: expected label or encodable integer pc offset
            bl      Fp

See attached patch.
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-12-31 17:04:27 UTC
A commit references this bug:

Author: mikael
Date: Thu Dec 31 17:03:27 UTC 2020
New revision: 559754
URL: https://svnweb.freebsd.org/changeset/ports/559754

Log:
  lang/ghc: fix build on aarch64

  checking for llc-6.0... no
  checking for llc... no
  checking for opt-6.0... no
  checking for opt... no

  checking for llc-9... no
  checking for llc-9.0... no
  checking for llc... no
  checking for opt-9... no
  checking for opt-9.0... no
  checking for opt... no

  PR:		252166
  Approved by:	portmgr (tier-2 blanket)

Changes:
  head/lang/ghc/Makefile
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2021-01-01 12:38:41 UTC
Thanks for that.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-01-28 07:38:26 UTC
A commit references this bug:

Author: mikael
Date: Thu Jan 28 07:38:21 UTC 2021
New revision: 563113
URL: https://svnweb.freebsd.org/changeset/ports/563113

Log:
  lang/ghc: arm requires clang90 to build

  PR:		252166
  Approved by:	portmgr (tier-2 blanket)

Changes:
  head/lang/ghc/Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-02-11 16:38:12 UTC
A commit references this bug:

Author: mikael
Date: Thu Feb 11 16:37:42 UTC 2021
New revision: 564963
URL: https://svnweb.freebsd.org/changeset/ports/564963

Log:
  lang/ghc: use CONFIGURE_ENV instead of BINARY_ALIAS on arm

  GHC saves the llvm command name (llc, opt, clang) found at compile time in its
  settings file.
  Using BINARY_ALIAS allows lang/ghc to build but breaks
  ghc ports (devel/hs-cabal-install for example)
  GHC configure script accepts now to define LLC, OPT, CLANG as
  environment variable, switch to it.

  <no location info>: error:
      Warning: Couldn't figure out LLVM version!
               Make sure you have installed LLVM 9

  <no location info>: error: ghc: could not execute: opt-9.0

  PR:		252166, 253367
  Approved by:	portmgr (tier-2 blanket)

Changes:
  head/lang/ghc/Makefile
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2021-02-12 10:13:56 UTC
Good catch, thanks!