mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
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
This commit is contained in:
parent
d997c3a8d9
commit
885ff9ed35
@ -61,6 +61,10 @@ PLIST_SUB+= ARCH="generic"
|
||||
|
||||
.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
|
||||
|
20
math/blis/files/extra-patch-config_knl_make__defs.mk
Normal file
20
math/blis/files/extra-patch-config_knl_make__defs.mk
Normal file
@ -0,0 +1,20 @@
|
||||
--- config/knl/make_defs.mk.orig 2022-04-01 13:12:06 UTC
|
||||
+++ config/knl/make_defs.mk
|
||||
@@ -81,7 +81,7 @@ ifeq ($(CC_VENDOR),clang)
|
||||
CKVECFLAGS := -xMIC-AVX512
|
||||
else
|
||||
ifeq ($(CC_VENDOR),clang)
|
||||
-CKVECFLAGS := -mavx512f -mavx512pf -mfpmath=sse -march=knl
|
||||
+CKVECFLAGS := -mavx512f -mfpmath=sse -march=knl
|
||||
else
|
||||
$(error gcc, icc, or clang is required for this configuration.)
|
||||
endif
|
||||
@@ -105,7 +105,7 @@ ifeq ($(CC_VENDOR),clang)
|
||||
CRVECFLAGS := -xMIC-AVX512
|
||||
else
|
||||
ifeq ($(CC_VENDOR),clang)
|
||||
-CRVECFLAGS := -march=knl -mno-avx512f -mno-avx512pf -mno-avx512er -mno-avx512cd -funsafe-math-optimizations -ffp-contract=fast
|
||||
+CRVECFLAGS := -march=knl -mno-avx512f -mno-avx512cd -funsafe-math-optimizations -ffp-contract=fast
|
||||
else
|
||||
$(error gcc, icc, or clang is required for this configuration.)
|
||||
endif
|
Loading…
Reference in New Issue
Block a user