Changeset View
Changeset View
Standalone View
Standalone View
lang/ghc/bsd.ghc.mk
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# bsd.ghc.mk -- Common code for various versions of GHC ports. | # bsd.ghc.mk -- Common code for various versions of GHC ports. | ||||
# | # | ||||
# Maintained by: haskell@FreeBSD.org | # Maintained by: haskell@FreeBSD.org | ||||
# | # | ||||
ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 | ONLY_FOR_ARCHS= amd64 i386 | ||||
GHC_VERSION_MAJOR= ${GHC_VERSION:S/./ /g:[1]} | GHC_VERSION_MAJOR= ${GHC_VERSION:S/./ /g:[1]} | ||||
GHC_VERSION_MINOR= ${GHC_VERSION:S/./ /g:[2]} | GHC_VERSION_MINOR= ${GHC_VERSION:S/./ /g:[2]} | ||||
.if ${GHC_VERSION_MAJOR} >= 8 && ${GHC_VERSION_MINOR} >= 6 | .if ${GHC_VERSION_MAJOR} >= 8 && ${GHC_VERSION_MINOR} >= 6 | ||||
ONLY_FOR_ARCHS+= powerpc64 | ONLY_FOR_ARCHS+= aarch64 armv6 armv7 powerpc64 | ||||
.endif | .endif | ||||
DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION} | DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION} | ||||
EXAMPLESDIR= ${PREFIX}/share/examples/ghc-${GHC_VERSION} | EXAMPLESDIR= ${PREFIX}/share/examples/ghc-${GHC_VERSION} | ||||
USES= autoreconf gmake iconv:translit localbase:ldflags ncurses perl5 tar:xz | USES= autoreconf gmake iconv:translit localbase:ldflags ncurses perl5 tar:xz | ||||
USE_LOCALE= en_US.UTF-8 | USE_LOCALE= en_US.UTF-8 | ||||
USE_PERL5= build | USE_PERL5= build | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
LOCALBASE?= /usr/local | LOCALBASE?= /usr/local | ||||
PLIST?= ${.CURDIR}/../../lang/ghc/pkg-plist | PLIST?= ${.CURDIR}/../../lang/ghc/pkg-plist | ||||
GHC_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/} | GHC_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/} | ||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
.if empty(PORT_OPTIONS:MBOOT) | .if empty(PORT_OPTIONS:MBOOT) | ||||
. if ${ARCH} == armv6 || ${ARCH} == armv7 | . if ${ARCH} == amd64 || ${ARCH} == i386 | ||||
BOOT_GHC_VERSION= 8.4.2 | |||||
. elif ${ARCH} == powerpc64 | |||||
BOOT_GHC_VERSION= 8.6.3 | |||||
. else | |||||
BOOT_GHC_VERSION= 8.4.3 | BOOT_GHC_VERSION= 8.4.3 | ||||
. else | |||||
BOOT_GHC_VERSION= 8.6.3 | |||||
. endif | . endif | ||||
# When GHC being compiled and GHC used for bootstrapping support different | # When GHC being compiled and GHC used for bootstrapping support different | ||||
# LLVM versions, we have to pull in both. Luckily, this is relatively rare. | # LLVM versions, we have to pull in both. Luckily, this is relatively rare. | ||||
. if ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 | . if ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 | ||||
# LLVM version that bootstrap compiler uses | # LLVM version that bootstrap compiler uses | ||||
BOOT_LLVM_VERSION= 50 | BOOT_LLVM_VERSION= 60 | ||||
tcberner: Would it be possible to go with LLVM_DEFAULT? Or is it too dependent on a certain version? | |||||
Done Inline ActionsUnfortunately it's impossible, see https://gitlab.haskell.org/ghc/ghc/wikis/improved-llvm-backend for details and also : mikael: Unfortunately it's impossible, see https://gitlab.haskell.org/ghc/ghc/wikis/improved-llvm… | |||||
. if ${BOOT_LLVM_VERSION} != ${LLVM_VERSION} | . if ${BOOT_LLVM_VERSION} != ${LLVM_VERSION} | ||||
BUILD_DEPENDS+= llc${BOOT_LLVM_VERSION}:devel/llvm${BOOT_LLVM_VERSION} | BUILD_DEPENDS+= llc${BOOT_LLVM_VERSION}:devel/llvm${BOOT_LLVM_VERSION} | ||||
RUN_DEPENDS+= llc${BOOT_LLVM_VERSION}:devel/llvm${BOOT_LLVM_VERSION} | RUN_DEPENDS+= llc${BOOT_LLVM_VERSION}:devel/llvm${BOOT_LLVM_VERSION} | ||||
. endif | . endif | ||||
. endif | . endif | ||||
DISTFILES+= ghc-${BOOT_GHC_VERSION}-boot-${ARCH}-freebsd${EXTRACT_SUFX}:boot | DISTFILES+= ghc-${BOOT_GHC_VERSION}-boot-${ARCH}-freebsd${EXTRACT_SUFX}:boot | ||||
▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines |
Would it be possible to go with LLVM_DEFAULT? Or is it too dependent on a certain version?