View | Details | Raw Unified | Return to bug 224584 | Differences between
and this patch

Collapse All | Expand All

(-)lang/pocl/Makefile (-26 / +29 lines)
Lines 1-45 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	pocl
3
PORTNAME=			pocl
4
PORTVERSION=	0.14
4
PORTVERSION=		1.3
5
CATEGORIES=	lang
5
DISTVERSIONPREFIX=	v
6
MASTER_SITES=	SF/pocl \
6
CATEGORIES=			lang
7
		http://portablecl.org/downloads/
8
7
9
MAINTAINER=	ohartman@zedat.fu-berlin.de
8
MAINTAINER=			ohartmann@walstatt.org
10
COMMENT=	POrtable Computing Language (POCL)
9
COMMENT=			POrtable Computing Language (POCL)
11
10
12
LICENSE=	MIT
11
LICENSE=			MIT
13
LICENSE_FILE=	${WRKSRC}/LICENSE
12
LICENSE_FILE=		${WRKSRC}/LICENSE
14
13
15
ONLY_FOR_ARCHS=		amd64 i386
14
ONLY_FOR_ARCHS=		amd64 i386
16
ONLY_FOR_ARCHS_REASON=	only tested on x86
15
ONLY_FOR_ARCHS_REASON=	only tested on x86
17
16
17
BROKEN_FreeBSD_10=	pocl is not supported on 10.x
18
18
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
19
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
19
		opencl>=2.1:devel/opencl
20
				opencl>=2.1:devel/opencl
20
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
21
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
21
		libOpenCL.so:devel/ocl-icd \
22
				libOpenCL.so:devel/ocl-icd \
22
		libltdl.so:devel/libltdl
23
				libltdl.so:devel/libltdl
23
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
24
RUN_DEPENDS=	${BUILD_DEPENDS}
24
25
25
LLVM_VERSION=	${MESA_LLVM_VER:U40}
26
LLVM_VERSION=	${MESA_LLVM_VER:U80}
26
27
27
USES=		cmake localbase:ldflags ncurses pkgconfig
28
USES=			cmake localbase:ldflags ncurses pkgconfig
28
USE_CXXSTD=	gnu++11
29
30
USE_GITHUB=		yes
29
USE_LDCONFIG=	yes
31
USE_LDCONFIG=	yes
30
32
31
CMAKE_ARGS=	-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
33
CMAKE_ARGS=		-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
32
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
34
				-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
33
		-DKERNELLIB_HOST_CPU_VARIANTS="distro"
35
				-DKERNELLIB_HOST_CPU_VARIANTS="distro" \
34
PLIST_SUB=	OPSYS=${OPSYS:tl} ARCH=${ARCH:S/amd64/x86_64/}
36
				-DSINGLE_LLVM_LIB=OFF
35
37
36
OPTIONS_DEFINE=	TEST
38
PLIST_SUB=		OPSYS=${OPSYS:tl} ARCH=${ARCH:S/amd64/x86_64/}
37
39
38
TEST_DESC=	Tests from the OpenCL book
40
OPTIONS_DEFINE=	DOCS
39
TEST_CMAKE_OFF=	-DENABLE_TESTSUITES=""
40
TEST_CMAKE_ON=	-DENABLE_TESTSUITES="all"
41
TEST_TARGET=	test
42
41
43
pre-install-TEST-on: do-test
42
DOCS_DESC=		Build documentation (needs sphinx)
43
DOCS_CMAKE_OFF=	-DENABLE_DOCS=OFF
44
DOCS_CMAKE_ON=	-DENABLE_DOCS=ON
45
DOCS_USES=		python
46
DOCS_BUILD_DEPENDS=	${PY_FLAVOR}-sphinx>0:textproc/py-sphinx@${PY_FLAVOR}
44
47
45
.include <bsd.port.mk>
48
.include <bsd.port.mk>
(-)lang/pocl/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1491868935
1
TIMESTAMP = 1555268767
2
SHA256 (pocl-0.14.tar.gz) = 2127bf925a91fbbe3daf2f1bac0da5c8aceb16e2a9434977a3057eade974106a
2
SHA256 (pocl-pocl-v1.3_GH0.tar.gz) = 6527e3f47fab7c21e96bc757c4ae3303901f35e23f64642d6da5cc4c4fcc915a
3
SIZE (pocl-0.14.tar.gz) = 1231630
3
SIZE (pocl-pocl-v1.3_GH0.tar.gz) = 1414807
(-)lang/pocl/files/patch-CMakeLists.txt (-14 / +5 lines)
Lines 1-21 Link Here
1
--- CMakeLists.txt.orig	2017-04-05 14:15:40 UTC
1
--- CMakeLists.txt.orig	2019-04-04 12:06:59 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -70,7 +70,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "a
3
@@ -546,6 +546,9 @@ else()
4
   set(ARMV6 1)
4
   set(HAVE_UTIME 0)
5
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
5
 endif()
6
   set(ARM64 1)
7
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|AMD64|x86_64)")
8
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|amd64|AMD64|x86_64)")
9
   if(POCL_DEVICE_ADDRESS_BITS MATCHES "32")
10
     set(I386 1)
11
   else()
12
@@ -318,6 +318,9 @@ include(CheckFunctionExists)
13
 check_function_exists(fork HAVE_FORK)
14
 check_function_exists(vfork HAVE_VFORK)
15
 
6
 
16
+include(CheckIncludeFiles)
7
+include(CheckIncludeFiles)
17
+check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYSCTL_H)
8
+check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYSCTL_H)
18
+
9
+
10
 
19
 ######################################################################################
11
 ######################################################################################
20
 
12
 
21
 if(NOT DEFINED DEFAULT_USE_VECMATHLIB)
(-)lang/pocl/files/patch-config.h.in.cmake (-3 / +3 lines)
Lines 1-6 Link Here
1
--- config.h.in.cmake.orig	2017-04-05 14:15:40 UTC
1
--- config.h.in.cmake.orig	2019-04-04 12:06:59 UTC
2
+++ config.h.in.cmake
2
+++ config.h.in.cmake
3
@@ -44,6 +44,8 @@
3
@@ -41,6 +41,8 @@
4
 
4
 
5
 #cmakedefine HAVE_VFORK
5
 #cmakedefine HAVE_VFORK
6
 
6
 
Lines 8-11 Link Here
8
+
8
+
9
 #cmakedefine HAVE_CLOCK_GETTIME
9
 #cmakedefine HAVE_CLOCK_GETTIME
10
 
10
 
11
 #cmakedefine HAVE_LTTNG_UST
11
 #cmakedefine HAVE_FDATASYNC
(-)lang/pocl/files/patch-lib_CL_devices_cpuinfo.c (-6 / +6 lines)
Lines 1-4 Link Here
1
--- lib/CL/devices/cpuinfo.c.orig	2017-04-05 14:15:40 UTC
1
--- lib/CL/devices/cpuinfo.c.orig	2019-04-04 12:06:59 UTC
2
+++ lib/CL/devices/cpuinfo.c
2
+++ lib/CL/devices/cpuinfo.c
3
@@ -34,6 +34,12 @@
3
@@ -34,6 +34,12 @@
4
 #include "config.h"
4
 #include "config.h"
Lines 13-19 Link Here
13
 static const char* cpuinfo = "/proc/cpuinfo";
13
 static const char* cpuinfo = "/proc/cpuinfo";
14
 #define MAX_CPUINFO_SIZE 64*1024
14
 #define MAX_CPUINFO_SIZE 64*1024
15
 //#define DEBUG_POCL_CPUINFO
15
 //#define DEBUG_POCL_CPUINFO
16
@@ -153,8 +159,51 @@ pocl_cpuinfo_detect_max_clock_frequency(
16
@@ -153,8 +159,51 @@ pocl_cpuinfo_detect_max_clock_frequency()
17
     } 
17
     } 
18
   return -1;  
18
   return -1;  
19
 }
19
 }
Lines 85-91 Link Here
85
 
85
 
86
 #ifdef POCL_ANDROID
86
 #ifdef POCL_ANDROID
87
 
87
 
88
@@ -270,6 +332,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
88
@@ -326,6 +388,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi
89
    * short_name is in the .data anyways.*/
89
    * short_name is in the .data anyways.*/
90
   device->long_name = device->short_name;
90
   device->long_name = device->short_name;
91
 
91
 
Lines 93-99 Link Here
93
   /* default vendor and vendor_id, in case it cannot be found by other means */
93
   /* default vendor and vendor_id, in case it cannot be found by other means */
94
   device->vendor = cpuvendor_default;
94
   device->vendor = cpuvendor_default;
95
   if (device->vendor_id == 0)
95
   if (device->vendor_id == 0)
96
@@ -318,7 +381,25 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
96
@@ -425,6 +488,25 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi
97
   char *new_name = (char*)malloc (len);
97
   char *new_name = (char*)malloc (len);
98
   snprintf (new_name, len, "%s-%s", device->short_name, start);
98
   snprintf (new_name, len, "%s-%s", device->short_name, start);
99
   device->long_name = new_name;
99
   device->long_name = new_name;
Lines 101-107 Link Here
101
+  int mib[2];
101
+  int mib[2];
102
+  size_t len = 0;
102
+  size_t len = 0;
103
+  char *model;
103
+  char *model;
104
 
104
+
105
+  mib[0] = CTL_HW;
105
+  mib[0] = CTL_HW;
106
+  mib[1] = HW_MODEL;
106
+  mib[1] = HW_MODEL;
107
+  if (sysctl(mib, 2, NULL, &len, NULL, 0))
107
+  if (sysctl(mib, 2, NULL, &len, NULL, 0))
Lines 118-121 Link Here
118
+#endif
118
+#endif
119
 }
119
 }
120
 
120
 
121
 void
121
 /*
(-)lang/pocl/pkg-descr (-10 / +10 lines)
Lines 1-22 Link Here
1
Portable OpenCL (pocl)
1
Portable OpenCL (pocl)
2
----------------------
2
----------------------
3
3
4
Portable OpenCL aims to be an efficient open source (MIT-licensed) 
4
Portable OpenCL aims to be an efficient open source (MIT-licensed)
5
implementation of the OpenCL 1.2 standard. 
5
implementation of the OpenCL 1.2 standard.
6
6
7
In addition to producing an easily portable open source OpenCL
7
In addition to producing an easily portable open source OpenCL
8
implementation, another major goal of the project is improving 
8
implementation, another major goal of the project is improving
9
performance portability of OpenCL programs with compiler 
9
performance portability of OpenCL programs with compiler
10
optimizations, reducing the need for target-dependent manual 
10
optimizations, reducing the need for target-dependent manual
11
optimizations. At the core of pocl is a set of LLVM passes 
11
optimizations. At the core of pocl is a set of LLVM passes
12
used to statically parallelize multiple work-items with the kernel
12
used to statically parallelize multiple work-items with the kernel
13
compiler, even in the presence of work-group barriers. This enables 
13
compiler, even in the presence of work-group barriers. This enables
14
parallelization of the fine-grained static concurrency in the work 
14
parallelization of the fine-grained static concurrency in the work
15
groups in multiple ways (SIMD, VLIW, superscalar,...).
15
groups in multiple ways (SIMD, VLIW, superscalar,...).
16
16
17
The code base is modularized to allow easy adding of new "device drivers"
17
The code base is modularized to allow easy adding of new "device drivers"
18
in the host-device layer. A generic multithreaded "target driver" is 
18
in the host-device layer. A generic multithreaded "target driver" is
19
included. It allows running OpenCL applications on a host that supports 
19
included. It allows running OpenCL applications on a host that supports
20
the pthread library with multithreading at the work group granularity.
20
the pthread library with multithreading at the work group granularity.
21
21
22
WWW: http://portablecl.org/
22
WWW: http://portablecl.org/
(-)lang/pocl/pkg-plist (-13 / +15 lines)
Lines 1-25 Link Here
1
bin/poclcc
1
bin/poclcc
2
etc/OpenCL/vendors/pocl.icd
2
etc/OpenCL/vendors/pocl.icd
3
include/poclu.h
4
lib/libpocl.so
3
lib/libpocl.so
5
lib/libpocl.so.1
4
lib/libpocl.so.2
6
lib/libpocl.so.1.7.0
5
lib/libpocl.so.2.3.0
7
lib/libpoclu.so
8
lib/libpoclu.so.1
9
lib/libpoclu.so.1.7.0
10
lib/pocl/libllvmopencl.so
6
lib/pocl/libllvmopencl.so
11
libdata/pkgconfig/pocl.pc
7
libdata/pkgconfig/pocl.pc
8
%%DATADIR%%/include/_builtin_renames.h
9
%%DATADIR%%/include/_clang_opencl.h
12
%%DATADIR%%/include/_enable_all_exts.h
10
%%DATADIR%%/include/_enable_all_exts.h
13
%%DATADIR%%/include/_kernel.h
11
%%DATADIR%%/include/_kernel.h
14
%%DATADIR%%/include/_kernel_c.h
12
%%DATADIR%%/include/_kernel_c.h
15
%%DATADIR%%/include/_kernel_constants.h
13
%%DATADIR%%/include/_kernel_constants.h
14
%%DATADIR%%/include/_pocl_opencl.h
16
%%DATADIR%%/include/pocl.h
15
%%DATADIR%%/include/pocl.h
17
%%DATADIR%%/include/pocl_device.h
16
%%DATADIR%%/include/pocl_device.h
17
%%DATADIR%%/include/pocl_image_types.h
18
%%DATADIR%%/include/pocl_spir.h
18
%%DATADIR%%/include/pocl_types.h
19
%%DATADIR%%/include/pocl_types.h
19
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx.bc
20
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-avx.bc
20
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx2.bc
21
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-avx2.bc
21
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx512.bc
22
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-avx512.bc
22
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_fma4.bc
23
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-avx_f16c.bc
23
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse2.bc
24
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-avx_fma4.bc
24
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse41.bc
25
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-sse2.bc
25
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-ssse3.bc
26
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-sse41.bc
27
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%PYTHON_PLATFORM%%.0-ssse3.bc

Return to bug 224584