Date: Thu, 23 Apr 2020 11:40:29 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r532669 - branches/2020Q2/misc/opennn Message-ID: <202004231140.03NBeTuc006996@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Thu Apr 23 11:40:29 2020 New Revision: 532669 URL: https://svnweb.freebsd.org/changeset/ports/532669 Log: MFH: r532668 misc/opennn: fix build on GCC architectures and powerpc64 elfv2 clang 8 doesn't have full support for powerpc, powerpc64 or powerpcspe, so use GCC there. On powerpc64 elfv2, the default is to build for elfv1, so pass a flag to fix it. Approved by: portmgr (fix build blanket) Modified: branches/2020Q2/misc/opennn/Makefile Directory Properties: branches/2020Q2/ (props changed) Modified: branches/2020Q2/misc/opennn/Makefile ============================================================================== --- branches/2020Q2/misc/opennn/Makefile Thu Apr 23 11:38:24 2020 (r532668) +++ branches/2020Q2/misc/opennn/Makefile Thu Apr 23 11:40:29 2020 (r532669) @@ -12,7 +12,7 @@ COMMENT= Open neural networks library LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt -USES= cmake dos2unix # compiler:c++11-lang +USES= cmake compiler dos2unix DOS2UNIX_FILES= CMakeLists.txt USE_GITHUB= yes GH_ACCOUNT= Artelnics @@ -29,16 +29,26 @@ MPI_BROKEN= https://github.com/Artelnics/OpenNN/issue OPENMP_CMAKE_BOOL= __OPENNN_OMP__ +.include <bsd.port.pre.mk> + +.if ${CHOSEN_COMPILER_TYPE} == gcc +USE_GCC= yes +.else # workaround for breakage with clang-10: https://github.com/Artelnics/OpenNN/issues/105 LLVM_VER= 80 BUILD_DEPENDS+= clang${LLVM_VER}:devel/llvm${LLVM_VER} CPP= clang-cpp${LLVM_VER} CC= clang${LLVM_VER} CXX= clang++${LLVM_VER} +# clang-8 defaults to elfv1 on FreeBSD, to be removed after moving to 9 or newer +.if ${ARCH} == powerpc64 +CFLAGS+= -mabi=elfv2 +.endif +.endif do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME} && ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME} ${INSTALL_DATA} ${BUILD_WRKSRC}/${PORTNAME}/libopennn.so ${STAGEDIR}${PREFIX}/lib ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libopennn.so -.include <bsd.port.mk> +.include <bsd.port.post.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004231140.03NBeTuc006996>