Skip to content

Commit

Permalink
graphics/opencv: when on POWER9 on powerpc64le, allow setting VSX3 as…
Browse files Browse the repository at this point in the history
… baseline

Also GCC is necessary because base LLVM 15 fails with:
UNREACHABLE executed at /usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp:11135!

LLVM 16 also crashes and it seems 17 has already fixed this issue.
  • Loading branch information
pkubaj committed Jun 21, 2023
1 parent 335e4a6 commit 3fc69f5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion graphics/opencv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libhdf5.so:science/hdf5

USES= cmake compiler:c++14-lang cpe localbase:ldflags pkgconfig
USES= cmake cpe localbase:ldflags pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= WeChatCV:wechat
GH_PROJECT= opencv_contrib:contrib \
Expand Down Expand Up @@ -214,6 +214,15 @@ OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg
_IPPICV_i386= ippicv/ippicv_2020_lnx_ia32_20191018_general.tgz
_IPPICV_amd64= ippicv/ippicv_2020_lnx_intel64_20191018_general.tgz

.include <bsd.port.options.mk>

.if ${ARCH} == powerpc64le && defined(MACHINE_CPU) && ${MACHINE_CPU:Mvsx3}
CMAKE_ARGS+= -DCPU_BASELINE:STRING="VSX;VSX3;"
USES+= compiler:gcc-c++11-lib
.else
USES+= compiler:c++14-lang
.endif

post-extract:
# Handle contrib
${MV} ${WRKSRC_contrib} ${WRKSRC}/contrib
Expand Down

0 comments on commit 3fc69f5

Please sign in to comment.