Changeset View
Changeset View
Standalone View
Standalone View
lang/ghc/Makefile
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
PROFILE_SUB_LIST= WITH_PROFILE="YES" | PROFILE_SUB_LIST= WITH_PROFILE="YES" | ||||
PROFILE_SUB_LIST_OFF= WITH_PROFILE="NO" | PROFILE_SUB_LIST_OFF= WITH_PROFILE="NO" | ||||
GHC_VERSION= 8.10.7 | GHC_VERSION= 8.10.7 | ||||
CABAL_VERSION= 3.2.1.0 | CABAL_VERSION= 3.2.1.0 | ||||
HSCOLOUR_VERSION= 1.24.4 | HSCOLOUR_VERSION= 1.24.4 | ||||
LLVM_VERSION= 10 | LLVM_VERSION= 10 | ||||
# LLVM version that bootstrap compiler uses | # LLVM version that bootstrap compiler uses | ||||
BOOT_LLVM_VERSION= 90 | BOOT_LLVM_VERSION= 10 | ||||
PLIST_SUB= GHC_VERSION=${GHC_VERSION} CABAL_VERSION=${CABAL_VERSION} | PLIST_SUB= GHC_VERSION=${GHC_VERSION} CABAL_VERSION=${CABAL_VERSION} | ||||
PORTDOCS= * | PORTDOCS= * | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
CONFIGURE_TARGET= ${GHC_ARCH}-portbld-${OPSYS:tl} | CONFIGURE_TARGET= ${GHC_ARCH}-portbld-${OPSYS:tl} | ||||
# This version of ncurses is needed by bootstrap compiler | # This version of ncurses is needed by bootstrap compiler | ||||
.if ${OSVERSION} > 1300078 && empty(PORT_OPTIONS:MBOOT) && ${ARCH} != powerpc64 | .if ${OSVERSION} > 1300078 && empty(PORT_OPTIONS:MBOOT) && ${ARCH} != powerpc64 | ||||
BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libncursesw.so.8:misc/compat12x | BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libncursesw.so.8:misc/compat12x | ||||
.endif | .endif | ||||
.if ${ARCH} == powerpc64 || ${OSVERSION} >= 1400018 | .if ${ARCH} == powerpc64 || ${OSVERSION} >= 1400018 | ||||
CONFIGURE_ARGS+= --enable-dtrace=0 | CONFIGURE_ARGS+= --enable-dtrace=0 | ||||
.endif | .endif | ||||
.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 | .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 | ||||
BOOT_GHC_VERSION= 8.6.3 | BOOT_GHC_VERSION= 8.6.3 | ||||
.elif ${ARCH} == aarch64 || ${ARCH:Marmv*} | .elif ${ARCH} == aarch64 || ${ARCH:Marmv*} | ||||
BOOT_GHC_VERSION= 8.10.4 | BOOT_GHC_VERSION= 8.10.7 | ||||
.else | .else | ||||
BOOT_GHC_VERSION= 8.6.5 | BOOT_GHC_VERSION= 8.6.5 | ||||
.endif | .endif | ||||
NO_CCACHE= ccache: error: Failed to create directory /nonexistent/.ccache/tmp: Permission denied | NO_CCACHE= ccache: error: Failed to create directory /nonexistent/.ccache/tmp: Permission denied | ||||
DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} | DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} | ||||
DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION} | DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION} | ||||
Show All 24 Lines | |||||
BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | ||||
DISTFILES+= ghc-${BOOT_GHC_VERSION}-boot-${ARCH}-freebsd${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:boot | DISTFILES+= ghc-${BOOT_GHC_VERSION}-boot-${ARCH}-freebsd${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:boot | ||||
.endif # MBOOT | .endif # MBOOT | ||||
.if ${ARCH} == aarch64 || ${ARCH:Marmv*} | .if ${ARCH} == aarch64 || ${ARCH:Marmv*} | ||||
# ghc-8.10.x on arm requires devel/llvm10 | # ghc-8.10.x on arm requires devel/llvm10 | ||||
# CONFIGURE_TARGET must to be the same as the llvm triple | # CONFIGURE_TARGET must to be the same as the llvm triple | ||||
CONFIGURE_TARGET= ${ARCH}-unknown-freebsd${"${ARCH:Maarch64}" != "":?:-gnueabihf} | CONFIGURE_TARGET= ${ARCH}-unknown-freebsd${"${ARCH:Maarch64}" != "":?:-gnueabihf} | ||||
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-aclocal.m4 | CONFIGURE_ARGS+= --host=${CONFIGURE_TARGET} | ||||
BUILD_DEPENDS+= llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION} | BUILD_DEPENDS+= llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION} | ||||
RUN_DEPENDS+= llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION} | RUN_DEPENDS+= llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION} | ||||
CONFIGURE_ENV+= LLC=llc${LLVM_VERSION} \ | |||||
OPT=opt${LLVM_VERSION} \ | |||||
CLANG=clang${LLVM_VERSION} \ | |||||
CC=clang${LLVM_VERSION} | |||||
# 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 ${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} | ||||
CONFIGURE_ENV_BOOTSTRAP=LLC=llc${BOOT_LLVM_VERSION} \ | |||||
OPT=opt${BOOT_LLVM_VERSION} \ | |||||
CLANG=clang${BOOT_LLVM_VERSION} \ | |||||
CC=clang${BOOT_LLVM_VERSION} | |||||
. endif | . endif | ||||
.endif | .endif | ||||
.if ${ARCH} == aarch64 || ${ARCH:Marmv*} || ${ARCH} == powerpc64 | .if ${ARCH} == aarch64 || ${ARCH:Marmv*} || ${ARCH} == powerpc64 | ||||
. ifdef QEMU_EMULATING | . ifdef QEMU_EMULATING | ||||
IGNORE= qemu-user-static isn't able to build lang/ghc, but it builds fine on a real hardware | IGNORE= qemu-user-static isn't able to build lang/ghc, but it builds fine on a real hardware | ||||
. endif | . endif | ||||
.endif | .endif | ||||
Show All 29 Lines | |||||
.endif | .endif | ||||
pre-configure: | pre-configure: | ||||
# Copy the subbed build.mk to the proper position | # Copy the subbed build.mk to the proper position | ||||
${CP} ${WRKDIR}/build.mk ${WRKSRC}/mk/build.mk | ${CP} ${WRKDIR}/build.mk ${WRKSRC}/mk/build.mk | ||||
# If we are using bootstrap compiler, configure and install it into ${BOOT_DIR} | # If we are using bootstrap compiler, configure and install it into ${BOOT_DIR} | ||||
.if empty(PORT_OPTIONS:MBOOT) | .if empty(PORT_OPTIONS:MBOOT) | ||||
cd ${BOOT_DIR} && ${CONFIGURE_ENV} ${CONFIGURE_ENV_BOOTSTRAP} ${CONFIGURE_CMD} --prefix=${BOOT_DIR} | cd ${BOOT_DIR} && ${CONFIGURE_ENV} ${CONFIGURE_ENV_BOOTSTRAP} ${CONFIGURE_CMD} --prefix=${BOOT_DIR} | ||||
markmi_dsl-only.net: So CONFIGURE_ENV_BOOTSTRAP, if non-empty (i.e, ${BOOT_LLVM_VERSION} != ${LLVM_VERSION})… | |||||
cd ${BOOT_DIR} && PACKAGES='' ${MAKE_CMD} install | cd ${BOOT_DIR} && PACKAGES='' ${MAKE_CMD} install | ||||
.else | .else | ||||
# otherwise, make sure we have "ghc" in PATH | # otherwise, make sure we have "ghc" in PATH | ||||
if ! ${WHICH} -s ghc ; then \ | if ! ${WHICH} -s ghc ; then \ | ||||
echo "No 'ghc' executable is found in your PATH! Turn off BOOT option." ; false ; \ | echo "No 'ghc' executable is found in your PATH! Turn off BOOT option." ; false ; \ | ||||
fi | fi | ||||
.endif | .endif | ||||
# If DOCS are set, install HsColour in-place | # If DOCS are set, install HsColour in-place | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |
So CONFIGURE_ENV_BOOTSTRAP, if non-empty (i.e, ${BOOT_LLVM_VERSION} != ${LLVM_VERSION}), overrode CONFIGURE_ENV 's LLC, OPT, CLANG, and CC for phase_0_build, phase_1_build, and final? In such a context, LLVM_VERSION validly went unused for all phases for all 4 of the related commands generated?
And, after the change, phase_0_build, phase_1_build, and final instead now ignore LLVM_VERSION and BOOT_LLVM_VERSION relative to llc, opt, clang, and cc commands, even when ${BOOT_LLVM_VERSION} != ${LLVM_VERSION} ? Is this expected to be appropriate for modern enough llvm* ?