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

Collapse All | Expand All

(-)pocl/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1491868935
1
TIMESTAMP = 1513954395
2
SHA256 (pocl-0.14.tar.gz) = 2127bf925a91fbbe3daf2f1bac0da5c8aceb16e2a9434977a3057eade974106a
2
SHA256 (pocl-1.0.tar.gz) = 94bd86a2f9847c03e6c3bf8dca12af3734f8b272ffeacbc3fa8fcca58844b1d4
3
SIZE (pocl-0.14.tar.gz) = 1231630
3
SIZE (pocl-1.0.tar.gz) = 1536827
(-)pocl/files/patch-CMakeLists.txt (-6 / +6 lines)
Lines 1-15 Link Here
1
--- CMakeLists.txt.orig	2017-04-05 14:15:40 UTC
1
--- CMakeLists.txt.orig	2018-01-08 09:09:03 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 "a
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
@@ -395,6 +395,9 @@ include(CheckFunctionExists)
12
@@ -318,6 +318,9 @@ include(CheckFunctionExists)
13
 check_function_exists(fork HAVE_FORK)
13
 check_function_exists(fork HAVE_FORK)
14
 check_function_exists(vfork HAVE_VFORK)
14
 check_function_exists(vfork HAVE_VFORK)
15
 
15
 
Lines 18-21 Link Here
18
+
18
+
19
 ######################################################################################
19
 ######################################################################################
20
 
20
 
21
 if(NOT DEFINED DEFAULT_USE_VECMATHLIB)
21
 if((DEFINED ENABLE_VECMATHLIB) AND (DEFINED ENABLE_SLEEF))
(-)pocl/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	2018-01-08 09:11:14 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
 
(-)pocl/files/patch-lib_CL_devices_cpuinfo.c (-17 / +19 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	2018-01-08 09:13:55 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-22 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
@@ -154,7 +160,51 @@ pocl_cpuinfo_detect_max_clock_frequency(
17
     } 
18
   return -1;  
17
   return -1;  
19
 }
18
 }
19
 
20
-
20
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
21
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
21
+/**
22
+/**
22
+ * Detects the maximum clock frequency of the CPU.
23
+ * Detects the maximum clock frequency of the CPU.
Lines 25-31 Link Here
25
+ *
26
+ *
26
+ * @return The clock frequency in MHz.
27
+ * @return The clock frequency in MHz.
27
+ */
28
+ */
28
+int
29
+static int
29
+pocl_cpuinfo_detect_max_clock_frequency()
30
+pocl_cpuinfo_detect_max_clock_frequency()
30
+{
31
+{
31
+  const char mib1[] = "dev.cpu.0.freq_levels";
32
+  const char mib1[] = "dev.cpu.0.freq_levels";
Lines 33-39 Link Here
33
+  int clockrate = 0;
34
+  int clockrate = 0;
34
+  size_t size = 0;
35
+  size_t size = 0;
35
+  char *value = NULL;
36
+  char *value = NULL;
36
 
37
+ 
37
+  if (!sysctlbyname(mib1, NULL, &size, NULL, 0) &&
38
+  if (!sysctlbyname(mib1, NULL, &size, NULL, 0) &&
38
+      (value = (char*)malloc(++size)) &&
39
+      (value = (char*)malloc(++size)) &&
39
+      !sysctlbyname(mib1, (void*)value, &size, NULL, 0))
40
+      !sysctlbyname(mib1, (void*)value, &size, NULL, 0))
Lines 54-74 Link Here
54
+/**
55
+/**
55
+ * Unimplemented for other platforms.
56
+ * Unimplemented for other platforms.
56
+ */
57
+ */
57
+ int
58
+static int
58
+pocl_cpuinfo_detect_max_clock_frequency()
59
+pocl_cpuinfo_detect_max_clock_frequency()
59
+{
60
+{
60
+  return 0;
61
+  return -1;
61
+}
62
+}
62
+#endif
63
+#endif
63
 
64
+ 
64
+#ifdef __linux__
65
+#ifdef __linux__
65
 /**
66
 /**
66
  * Detects the number of parallel hardware threads supported by
67
  * Detects the number of parallel hardware threads supported by
67
  * the CPU by parsing the cpuinfo.
68
  * the CPU by parsing the cpuinfo.
68
@@ -232,6 +281,19 @@ pocl_cpuinfo_detect_compute_unit_count()
69
@@ -233,6 +283,20 @@ pocl_cpuinfo_detect_compute_unit_count()
69
     } 
70
   return -1;  
70
   return -1;  
71
 }
71
 }
72
 
72
+#else
73
+#else
73
+/**
74
+/**
74
+ * Detects the number of parallel hardware threads supported by
75
+ * Detects the number of parallel hardware threads supported by
Lines 76-107 Link Here
76
+ *
77
+ *
77
+ * @return The number of hardware threads.
78
+ * @return The number of hardware threads.
78
+ */
79
+ */
79
+ int
80
+static int
80
+pocl_cpuinfo_detect_compute_unit_count()
81
+pocl_cpuinfo_detect_compute_unit_count()
81
+{
82
+{
82
+  return sysconf(_SC_NPROCESSORS_ONLN);
83
+  return sysconf(_SC_NPROCESSORS_ONLN);
83
+}
84
+}
84
+#endif
85
+#endif
85
 
86
+ 
86
 #ifdef POCL_ANDROID
87
 #ifdef POCL_ANDROID
87
 
88
 
88
@@ -270,6 +332,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
89
 #define SYSFS_CPU_NUM_CORES_NODE    "/sys/devices/system/cpu/possible"
90
@@ -326,6 +390,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
89
    * short_name is in the .data anyways.*/
91
    * short_name is in the .data anyways.*/
90
   device->long_name = device->short_name;
92
   device->long_name = device->short_name;
91
 
93
 
92
+#ifdef __linux__ 
94
+#ifdef __linux__
93
   /* default vendor and vendor_id, in case it cannot be found by other means */
95
   /* default vendor and vendor_id, in case it cannot be found by other means */
94
   device->vendor = cpuvendor_default;
96
   device->vendor = cpuvendor_default;
95
   if (device->vendor_id == 0)
97
   if (device->vendor_id == 0)
96
@@ -318,7 +381,25 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
98
@@ -425,6 +490,25 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
97
   char *new_name = (char*)malloc (len);
99
   char *new_name = (char*)malloc (len);
98
   snprintf (new_name, len, "%s-%s", device->short_name, start);
100
   snprintf (new_name, len, "%s-%s", device->short_name, start);
99
   device->long_name = new_name;
101
   device->long_name = new_name;
100
+#elif defined(HAVE_SYSCTL_H)
102
+  #elif defined(HAVE_SYSCTL_H)
101
+  int mib[2];
103
+  int mib[2];
102
+  size_t len = 0;
104
+  size_t len = 0;
103
+  char *model;
105
+  char *model;
104
 
106
+
105
+  mib[0] = CTL_HW;
107
+  mib[0] = CTL_HW;
106
+  mib[1] = HW_MODEL;
108
+  mib[1] = HW_MODEL;
107
+  if (sysctl(mib, 2, NULL, &len, NULL, 0))
109
+  if (sysctl(mib, 2, NULL, &len, NULL, 0))
(-)pocl/files/patch-lib_CL_pocl__binary.c (-1 / +1 lines)
Lines 1-4 Link Here
1
--- lib/CL/pocl_binary.c.orig	2017-04-05 14:15:40 UTC
1
--- lib/CL/pocl_binary.c.orig	2018-01-08 09:12:28 UTC
2
+++ lib/CL/pocl_binary.c
2
+++ lib/CL/pocl_binary.c
3
@@ -36,7 +36,7 @@
3
@@ -36,7 +36,7 @@
4
 #include <libgen.h>
4
 #include <libgen.h>
(-)pocl/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;
(-)pocl/Makefile (-8 / +5 lines)
Lines 1-10 Link Here
1
# $FreeBSD: head/lang/pocl/Makefile 456680 2017-12-18 21:53:28Z antoine $
1
# $FreeBSD: head/lang/pocl/Makefile 440691 2017-05-12 17:08:26Z rezny $
2
2
3
PORTNAME=	pocl
3
PORTNAME=	pocl
4
PORTVERSION=	0.14
4
PORTVERSION=	1.0
5
CATEGORIES=	lang
5
CATEGORIES=	lang
6
MASTER_SITES=	SF/pocl \
6
MASTER_SITES=	http://portablecl.org/downloads/
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-19 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
16
17
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
14
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
18
		opencl>=2.1:devel/opencl
15
		opencl>=2.1:devel/opencl
19
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
16
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
Lines 22-35 Link Here
22
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
19
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
23
20
24
BROKEN_FreeBSD_10=	pocl is not supported on 10.x
21
BROKEN_FreeBSD_10=	pocl is not supported on 10.x
25
ONLY_FOR_ARCHS=		i386 amd64
22
ONLY_FOR_ARCHS=		amd64 i386
26
ONLY_FOR_ARCHS_REASON=	only tested on x86
23
ONLY_FOR_ARCHS_REASON=	only tested on x86
27
24
28
LLVM_VERSION=	${MESA_LLVM_VER:U40}
25
LLVM_VERSION=	${MESA_LLVM_VER:U40}
29
26
27
USES=		cmake localbase:ldflags ncurses pkgconfig
30
USE_LDCONFIG=	yes
28
USE_LDCONFIG=	yes
31
USE_CXXSTD=	gnu++11
29
USE_CXXSTD=	gnu++11
32
USES=		cmake localbase:ldflags ncurses pkgconfig
33
30
34
CMAKE_ARGS=	-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
31
CMAKE_ARGS=	-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
35
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
32
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
(-)pocl/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.bc
20
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx2.bc
21
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx2.bc
21
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx512.bc
22
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx512.bc
22
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx_fma4.bc
23
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_f16c.bc
23
%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-sse2.bc
24
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_fma4.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