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

Collapse All | Expand All

(-)Makefile (-9 / +8 lines)
Lines 1-10 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	pocl
3
PORTNAME=	pocl
4
PORTVERSION=	0.14
4
PORTVERSION=	1.0
5
DISTVERSIONPREFIX=	v
5
CATEGORIES=	lang
6
CATEGORIES=	lang
6
MASTER_SITES=	SF/pocl \
7
		http://portablecl.org/downloads/
8
7
9
MAINTAINER=	ohartman@zedat.fu-berlin.de
8
MAINTAINER=	ohartman@zedat.fu-berlin.de
10
COMMENT=	POrtable Computing Language (POCL)
9
COMMENT=	POrtable Computing Language (POCL)
Lines 12-18 Link Here
12
LICENSE=	MIT
11
LICENSE=	MIT
13
LICENSE_FILE=	${WRKSRC}/LICENSE
12
LICENSE_FILE=	${WRKSRC}/LICENSE
14
13
15
BROKEN=		fails to package
14
BROKEN_FreeBSD_10=	pocl is not supported on 10.x
15
ONLY_FOR_ARCHS=		amd64 i386
16
ONLY_FOR_ARCHS_REASON=	only tested on x86
16
17
17
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
18
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
18
		opencl>=2.1:devel/opencl
19
		opencl>=2.1:devel/opencl
Lines 21-35 Link Here
21
		libltdl.so:devel/libltdl
22
		libltdl.so:devel/libltdl
22
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
23
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
23
24
24
BROKEN_FreeBSD_10=	pocl is not supported on 10.x
25
LLVM_VERSION=	${MESA_LLVM_VER:U50}
25
ONLY_FOR_ARCHS=		i386 amd64
26
ONLY_FOR_ARCHS_REASON=	only tested on x86
27
26
28
LLVM_VERSION=	${MESA_LLVM_VER:U40}
27
USES=		cmake localbase:ldflags ncurses pkgconfig
29
28
29
USE_GITHUB=	yes
30
USE_LDCONFIG=	yes
30
USE_LDCONFIG=	yes
31
USE_CXXSTD=	gnu++11
31
USE_CXXSTD=	gnu++11
32
USES=		cmake localbase:ldflags ncurses pkgconfig
33
32
34
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" \
35
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
34
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1491868935
1
TIMESTAMP = 1519229114
2
SHA256 (pocl-0.14.tar.gz) = 2127bf925a91fbbe3daf2f1bac0da5c8aceb16e2a9434977a3057eade974106a
2
SHA256 (pocl-pocl-v1.0_GH0.tar.gz) = 94bd86a2f9847c03e6c3bf8dca12af3734f8b272ffeacbc3fa8fcca58844b1d4
3
SIZE (pocl-0.14.tar.gz) = 1231630
3
SIZE (pocl-pocl-v1.0_GH0.tar.gz) = 1536827
(-)files/patch-CMakeLists.txt (-8 / +8 lines)
Lines 1-21 Link Here
1
--- CMakeLists.txt.orig	2017-04-05 14:15:40 UTC
1
--- CMakeLists.txt.orig	2017-12-18 18:45:53 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -70,7 +70,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "a
3
@@ -97,7 +97,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv6")
4
   set(ARMV6 1)
5
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
4
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
6
   set(ARM64 1)
5
   set(ARM64 1)
6
   set(ARM 1)
7
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|AMD64|x86_64)")
7
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|AMD64|x86_64)")
8
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|amd64|AMD64|x86_64)")
8
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|amd64|AMD64|x86_64)")
9
   set(X86 1)
9
   if(POCL_DEVICE_ADDRESS_BITS MATCHES "32")
10
   if(POCL_DEVICE_ADDRESS_BITS MATCHES "32")
10
     set(I386 1)
11
     set(I386 1)
11
   else()
12
@@ -394,6 +394,9 @@ endif()
12
@@ -318,6 +318,9 @@ include(CheckFunctionExists)
13
 include(CheckFunctionExists)
13
 check_function_exists(fork HAVE_FORK)
14
 check_function_exists(fork HAVE_FORK)
14
 check_function_exists(vfork HAVE_VFORK)
15
 check_function_exists(vfork HAVE_VFORK)
15
 
16
+
16
+include(CheckIncludeFiles)
17
+include(CheckIncludeFiles)
17
+check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYSCTL_H)
18
+check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYSCTL_H)
18
+
19
 
19
 ######################################################################################
20
 ######################################################################################
20
 
21
 
21
 if(NOT DEFINED DEFAULT_USE_VECMATHLIB)
(-)files/patch-config.h.in.cmake (-2 / +2 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	2017-12-18 18:45:53 UTC
2
+++ config.h.in.cmake
2
+++ config.h.in.cmake
3
@@ -44,6 +44,8 @@
3
@@ -36,6 +36,8 @@
4
 
4
 
5
 #cmakedefine HAVE_VFORK
5
 #cmakedefine HAVE_VFORK
6
 
6
 
(-)files/patch-lib_CL_devices_cpuinfo.c (-12 / +12 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	2017-12-18 18:45:53 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-25 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
 }
20
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
20
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
21
+/**
21
+/**
22
+ * Detects the maximum clock frequency of the CPU.
22
+ * Detects the maximum clock frequency of the CPU
23
+ *
23
+ *
24
+ * Assumes all cores have the same max clock freq.
24
+ * Assumes all cores have the same max clock freq.
25
+ *
25
+ *
Lines 35-42 Link Here
35
+  char *value = NULL;
35
+  char *value = NULL;
36
 
36
 
37
+  if (!sysctlbyname(mib1, NULL, &size, NULL, 0) &&
37
+  if (!sysctlbyname(mib1, NULL, &size, NULL, 0) &&
38
+      (value = (char*)malloc(++size)) &&
38
+    (value = (char*)malloc(++size)) &&
39
+      !sysctlbyname(mib1, (void*)value, &size, NULL, 0))
39
+    !sysctlbyname(mib1, (void*)value, &size, NULL, 0))
40
+    {
40
+    {
41
+      value[size] = '\0';
41
+      value[size] = '\0';
42
+      sscanf(value, "%d/%*d", &clockrate);
42
+      sscanf(value, "%d/%*d", &clockrate);
Lines 43-49 Link Here
43
+    }
43
+    }
44
+  else
44
+  else
45
+    {
45
+    {
46
+      size = sizeof(clockrate); 
46
+      size = sizeof(clockrate);
47
+      sysctlbyname(mib2, (void*)&clockrate, &size, NULL, 0);
47
+      sysctlbyname(mib2, (void*)&clockrate, &size, NULL, 0);
48
+    }
48
+    }
49
+  if (value)
49
+  if (value)
Lines 54-60 Link Here
54
+/**
54
+/**
55
+ * Unimplemented for other platforms.
55
+ * Unimplemented for other platforms.
56
+ */
56
+ */
57
+ int
57
+int
58
+pocl_cpuinfo_detect_max_clock_frequency()
58
+pocl_cpuinfo_detect_max_clock_frequency()
59
+{
59
+{
60
+  return 0;
60
+  return 0;
Lines 76-82 Link Here
76
+ *
76
+ *
77
+ * @return The number of hardware threads.
77
+ * @return The number of hardware threads.
78
+ */
78
+ */
79
+ int
79
+int
80
+pocl_cpuinfo_detect_compute_unit_count()
80
+pocl_cpuinfo_detect_compute_unit_count()
81
+{
81
+{
82
+  return sysconf(_SC_NPROCESSORS_ONLN);
82
+  return sysconf(_SC_NPROCESSORS_ONLN);
Lines 85-99 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
 
92
+#ifdef __linux__ 
92
+#ifdef __linux__
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))
(-)files/patch-tests_regression_test__issue__445.cpp (-11 lines)
Lines 1-11 Link Here
1
--- tests/regression/test_issue_445.cpp.orig	2017-04-05 14:15:40 UTC
2
+++ tests/regression/test_issue_445.cpp
3
@@ -29,7 +29,7 @@ private_local_array(__global int *__rest
4
 }
5
 )CLC";
6
 
7
-int main(int, char *)
8
+int main(int, char **)
9
 {
10
   try {
11
     int N = 9;
(-)pkg-plist (-11 / +13 lines)
Lines 2-14 Link Here
2
etc/OpenCL/vendors/pocl.icd
2
etc/OpenCL/vendors/pocl.icd
3
include/poclu.h
3
include/poclu.h
4
lib/libpocl.so
4
lib/libpocl.so
5
lib/libpocl.so.1
5
lib/libpocl.so.2
6
lib/libpocl.so.1.7.0
6
lib/libpocl.so.2.0.0
7
lib/libpoclu.so
7
lib/libpoclu.so
8
lib/libpoclu.so.1
8
lib/libpoclu.so.2
9
lib/libpoclu.so.1.7.0
9
lib/libpoclu.so.2.0.0
10
lib/pocl/libllvmopencl.so
10
lib/pocl/libllvmopencl.so
11
libdata/pkgconfig/pocl.pc
11
libdata/pkgconfig/pocl.pc
12
%%DATADIR%%/include/_builtin_renames.h
12
%%DATADIR%%/include/_enable_all_exts.h
13
%%DATADIR%%/include/_enable_all_exts.h
13
%%DATADIR%%/include/_kernel.h
14
%%DATADIR%%/include/_kernel.h
14
%%DATADIR%%/include/_kernel_c.h
15
%%DATADIR%%/include/_kernel_c.h
Lines 16-25 Link Here
16
%%DATADIR%%/include/pocl.h
17
%%DATADIR%%/include/pocl.h
17
%%DATADIR%%/include/pocl_device.h
18
%%DATADIR%%/include/pocl_device.h
18
%%DATADIR%%/include/pocl_types.h
19
%%DATADIR%%/include/pocl_types.h
19
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx.bc
20
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_f16c.bc
20
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx2.bc
21
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_fma4.bc
21
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx512.bc
22
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx.bc
22
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx_fma4.bc
23
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx2.bc
23
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-sse2.bc
24
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx512.bc
24
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-sse41.bc
25
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse2.bc
25
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-ssse3.bc
26
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse41.bc
27
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-ssse3.bc

Return to bug 224584