Mon Sep 20 09:05:31 2021 UTC ()
pocl: work around broken CPU detection on aarch64


(nia)
diff -r1.4 -r1.5 pkgsrc/parallel/pocl/Makefile

cvs diff -r1.4 -r1.5 pkgsrc/parallel/pocl/Makefile (expand / switch to unified diff)

--- pkgsrc/parallel/pocl/Makefile 2021/06/11 15:09:23 1.4
+++ pkgsrc/parallel/pocl/Makefile 2021/09/20 09:05:30 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.4 2021/06/11 15:09:23 nia Exp $ 1# $NetBSD: Makefile,v 1.5 2021/09/20 09:05:30 nia Exp $
2 2
3DISTNAME= pocl-1.7 3DISTNAME= pocl-1.7
4PKGREVISION= 2 4PKGREVISION= 2
5CATEGORIES= parallel 5CATEGORIES= parallel
6MASTER_SITES= http://portablecl.org/downloads/ 6MASTER_SITES= http://portablecl.org/downloads/
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://portablecl.org/ 9HOMEPAGE= http://portablecl.org/
10COMMENT= Portable implementation of the OpenCL standard 10COMMENT= Portable implementation of the OpenCL standard
11LICENSE= mit 11LICENSE= mit
12 12
13USE_CMAKE= yes 13USE_CMAKE= yes
14USE_TOOLS+= pkg-config 14USE_TOOLS+= pkg-config
@@ -23,26 +23,31 @@ CMAKE_ARGS+= -DCMAKE_BUILD_TYPE="Release @@ -23,26 +23,31 @@ CMAKE_ARGS+= -DCMAKE_BUILD_TYPE="Release
23CMAKE_ARGS+= -DCMAKE_INSTALL_LIBDIR="lib" 23CMAKE_ARGS+= -DCMAKE_INSTALL_LIBDIR="lib"
24CMAKE_ARGS+= -DPOCL_INSTALL_ICD_VENDORDIR="${PREFIX}/share/examples/OpenCL/vendors" 24CMAKE_ARGS+= -DPOCL_INSTALL_ICD_VENDORDIR="${PREFIX}/share/examples/OpenCL/vendors"
25CMAKE_ARGS+= -DKERNELLIB_HOST_CPU_VARIANTS="distro" 25CMAKE_ARGS+= -DKERNELLIB_HOST_CPU_VARIANTS="distro"
26CMAKE_ARGS+= -DLLVM_CONFIG=${LLVM_CONFIG_PATH:Q} 26CMAKE_ARGS+= -DLLVM_CONFIG=${LLVM_CONFIG_PATH:Q}
27 27
28LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/pocl 28LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/pocl
29 29
30# The PLIST includes target-specific files so needs to be generated. 30# The PLIST includes target-specific files so needs to be generated.
31GENERATE_PLIST+= find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \ 31GENERATE_PLIST+= find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \
32 sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ; 32 sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ;
33 33
34.include "../../mk/bsd.prefs.mk" 34.include "../../mk/bsd.prefs.mk"
35 35
 36# "LLVM could not recognize your CPU model automatically..."
 37.if !empty(MACHINE_ARCH:Maarch64*)
 38CMAKE_ARGS+= -DLLC_HOST_CPU="cortex-a53"
 39.endif
 40
36pre-configure: 41pre-configure:
37.if empty(PKGSRC_COMPILER:M*clang*) 42.if empty(PKGSRC_COMPILER:M*clang*)
38# XXX: When using GCC, pkgsrc provides 'clang' wrappers that are actually gcc. 43# XXX: When using GCC, pkgsrc provides 'clang' wrappers that are actually gcc.
39# XXX: This is copied from Firefox, which also needs this hack... 44# XXX: This is copied from Firefox, which also needs this hack...
40 ${LN} -sf ${PREFIX}/bin/clang ${WRKDIR}/.cwrapper/bin/clang 45 ${LN} -sf ${PREFIX}/bin/clang ${WRKDIR}/.cwrapper/bin/clang
41 ${LN} -sf ${PREFIX}/bin/clang++ ${WRKDIR}/.cwrapper/bin/clang++ 46 ${LN} -sf ${PREFIX}/bin/clang++ ${WRKDIR}/.cwrapper/bin/clang++
42 ${LN} -sf ${PREFIX}/bin/clang-cpp ${WRKDIR}/.cwrapper/bin/clang-cpp 47 ${LN} -sf ${PREFIX}/bin/clang-cpp ${WRKDIR}/.cwrapper/bin/clang-cpp
43.endif 48.endif
44 49
45OWN_DIRS+= ${PKG_SYSCONFDIR}/OpenCL/vendors 50OWN_DIRS+= ${PKG_SYSCONFDIR}/OpenCL/vendors
46 51
47CONF_FILES+= ${PREFIX}/share/examples/OpenCL/vendors/pocl.icd \ 52CONF_FILES+= ${PREFIX}/share/examples/OpenCL/vendors/pocl.icd \
48 ${PKG_SYSCONFDIR}/OpenCL/vendors/pocl.icd 53 ${PKG_SYSCONFDIR}/OpenCL/vendors/pocl.icd