| Summary: | lang/ghc: Fails to compile due to base/ports LLVM triple target names: error: Warning: Couldn't figure out LLVM version! | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Filipe da Silva Santos <contact> | ||||
| Component: | Individual Port(s) | Assignee: | freebsd-haskell (Nobody) <haskell> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Many People | CC: | arrowd, brooks, dim, toolchain | ||||
| Priority: | --- | Keywords: | needs-qa, regression | ||||
| Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(haskell) koobs: maintainer-feedback? (brooks) koobs: maintainer-feedback? (dim) koobs: merge-quarterly? |
||||
| Hardware: | amd64 | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Filipe da Silva Santos
2022-02-08 19:21:07 UTC
From ghc patch: +- "amd64-portbld-freebsd" ++ "x86_64-portbld-freebsd" Is/was the triple name for base/ports LLVM's intended and expected and is this issue just that GHC hadn't yet followed, or is this something that's better addressed in those ports at a toolchain/arch level with respect to how LLVM is built and presents itself? ^Triage: Loop in ports llvm (brooks) and base toolchain (dim) I dug back to llvm60 (the version in the ghc issue) and don't see an obvious path for amd64-portbld-freebsd to end up on the target list. The relevant cmake flags are: -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-portbld-freebsd13.0 -DLLVM_HOST_TRIPLE=x86_64-portbld-freebsd13.0 If we once patched the port to use that triple it's been a long time (though maybe it was a change in cmake infrastructure?). Presumably ghc should be patched to look for x86_64. Looking at the patch, I might leave the amd64 lines alone and simply add the new one. On the LLVM port side, there's an argument there's an argument for dropping `portbld` from LLVM_DEFAULT_TARGET_TRIPLE since it's non-standard, but I don't think that's especially related to this PR. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c7644898c7e173dd486e0a23b07c487d2460dee9 commit c7644898c7e173dd486e0a23b07c487d2460dee9 Author: Filipe da Silva Santos <contact@shiori.com.br> AuthorDate: 2022-02-13 18:19:38 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2022-02-13 18:23:45 +0000 lang/ghc: Add a patch for correctly selecting a LLVM backend. PR: 261798 MFH: 2022Q1 lang/ghc/Makefile | 1 + lang/ghc/files/patch-llvm-targets (new) | 11 +++++++++++ .../files/patch-utils_llvm-targets_gen-data-layout.sh (new) | 11 +++++++++++ 3 files changed, 23 insertions(+) A commit in branch 2022Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ace7cc4996e7fd6728f5a421e16ded21c498e30e commit ace7cc4996e7fd6728f5a421e16ded21c498e30e Author: Filipe da Silva Santos <contact@shiori.com.br> AuthorDate: 2022-02-13 18:19:38 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2022-02-13 18:24:45 +0000 lang/ghc: Add a patch for correctly selecting a LLVM backend. PR: 261798 MFH: 2022Q1 (cherry picked from commit c7644898c7e173dd486e0a23b07c487d2460dee9) lang/ghc/Makefile | 1 + lang/ghc/files/patch-llvm-targets (new) | 11 +++++++++++ .../files/patch-utils_llvm-targets_gen-data-layout.sh (new) | 11 +++++++++++ 3 files changed, 23 insertions(+) Thanks for the patch! |