Files
ports/math/blis/Makefile
Dimitry Andric 885ff9ed35 math/blis: fix build with clang 19
Clang 19 has removed support for the -mavx512pf and -mavx512er flags,
for the Intel Xeon Phi (aka "Knights Landing"/knl or "Knights
Mill"/knm) [1] [2].

This causes fatal errors during configuration of math/blis:

    Compiling obj/x86_64/kernels/knl/1m/bli_dpackm_knl_asm_24x8.o ('knl' CFLAGS for kernels)
    cc: fatal error: unknown argument '-mavx512pf'; did you mean '-mavx512f'?
    gmake: *** [Makefile:653: obj/x86_64/kernels/knl/1m/bli_dpackm_knl_asm_24x8.o] Error 1

Add an EXTRA_PATCHES entry to deal with this situation.

Note that in the future, this may also have to be done for gcc 15 and
later. In that case, the patch might be done unconditionally.

[1] https://github.com/llvm/llvm-project/pull/75580
[2] https://github.com/llvm/llvm-project/pull/92883

PR:		280783
Approved by:	maintainer timeout (2 weeks)
MFH:		2024Q3
2024-08-27 09:33:02 +02:00

76 lines
1.5 KiB
Makefile

PORTNAME= blis
PORTVERSION= 0.9.0
PORTREVISION= 2
CATEGORIES= math
MAINTAINER= jmd@FreeBSD.org
COMMENT= Software framework for high-performance BLAS-like libraries
WWW= https://github.com/flame/blis
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= bash:shells/bash
USES= compiler gmake perl5 python shebangfix
USE_GITHUB= yes
GH_ACCOUNT= flame
USE_LDCONFIG= yes
USE_PERL5= build
SHEBANG_FILES= build/flatten-headers.py
OPTIONS_DEFINE= PARA CBLAS
PARA_DESC= use pthread parallelization
CBLAS_DESC= build the CBLAS compatibility layer
OPTIONS_DEFAULT= PARA CBLAS
OPTIONS_SUB= yes
CFLAGS_riscv64= -mno-relax
HAS_CONFIGURE= yes
TEST_TARGET= test
.include <bsd.port.options.mk>
# enable BLAS and static/shared libs by default
CONFIGURE_ARGS+= --enable-blas \
--prefix=${PREFIX} \
--enable-shared \
--enable-static
#--prefix=PREFIX
.if ${PORT_OPTIONS:MPARA}
CONFIGURE_ARGS+= -t pthreads
.endif
.if ${PORT_OPTIONS:MCBLAS}
CONFIGURE_ARGS+= --enable-cblas
.endif
.if ${ARCH} == amd64
CONFIGURE_ARGS+= x86_64
PLIST_SUB+= ARCH="x86_64"
.elif ${ARCH:Mpowerpc64*}
CONFIGURE_ARGS+= power9
PLIST_SUB+= ARCH="power9"
USE_GCC= yes
.else
CONFIGURE_ARGS+= generic
PLIST_SUB+= ARCH="generic"
.endif
.include <bsd.port.pre.mk>
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 190
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-config_knl_make__defs.mk
.endif
.if ${CHOSEN_COMPILER_TYPE} == gcc
USE_GCC= yes
.endif
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libblis.so.4.0.0
.include <bsd.port.post.mk>