[BACK]Return to options.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / libLLVM

File: [cvs.NetBSD.org] / pkgsrc / lang / libLLVM / options.mk (download)

Revision 1.6, Mon Oct 31 14:54:38 2022 UTC (4 months, 2 weeks ago) by triaxx
Branch: MAIN
CVS Tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4
Changes since 1.5: +4 -2 lines

libLLVM: Improve fix for FreeBSD

pkgsrc changes:
  * Replace conditional configuration in Makefile by conditional option support
    in options.mk thanks to Tobias.

# $NetBSD: options.mk,v 1.6 2022/10/31 14:54:38 triaxx Exp $


LLVM_TARGETS=	AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore

.for tgt in ${LLVM_TARGETS}
PLIST_VARS+=			${tgt}
PKG_SUPPORTED_OPTIONS+=		llvm-target-${tgt:tl}
.if ${OPSYS} != "FreeBSD"

# Terminfo is used for colour output, only enable it by default if terminfo
# is builtin to avoid unnecessary dependencies which could cause bootstrap
# issues.
CHECK_BUILTIN.terminfo:=	yes
.include "../../mk/terminfo.builtin.mk"
CHECK_BUILTIN.terminfo:=	no
.if !empty(USE_BUILTIN.terminfo:M[yY][eE][sS]) && ${OPSYS} != "FreeBSD"

# Probably safe to assume that only x86 users are interested in
# cross-compilation for now. This saves some build time for everyone else.
.if !empty(MACHINE_ARCH:Msparc*)
PKG_SUGGESTED_OPTIONS+=	llvm-target-sparc
.elif !empty(MACHINE_ARCH:Mpowerpc*)
PKG_SUGGESTED_OPTIONS+=	llvm-target-powerpc
.elif !empty(MACHINE_ARCH:Maarch64)
PKG_SUGGESTED_OPTIONS+=	llvm-target-aarch64
.elif !empty(MACHINE_ARCH:Mearm*)
PKG_SUGGESTED_OPTIONS+=	llvm-target-arm
.elif !empty(MACHINE_ARCH:M*mips*)
PKG_SUGGESTED_OPTIONS+=	llvm-target-mips
# X86 and everyone else get all targets by default.
.  for tgt in ${LLVM_TARGETS}
PKG_SUGGESTED_OPTIONS+=	llvm-target-${tgt:tl}
.  endfor
PKG_SUGGESTED_OPTIONS+=	llvm-target-amdgpu	# for mesa/radeon

.include "../../mk/bsd.options.mk"

.for tgt in ${LLVM_TARGETS}
.  if !empty(PKG_OPTIONS:Mllvm-target-${tgt:tl})
PLIST.${tgt}=		yes
.  endif

.if !empty(PKG_OPTIONS:Mterminfo)
.include "../../mk/terminfo.buildlink3.mk"