FreeBSD Bugzilla – Attachment 181686 Details for
Bug 218332
lang/pocl: update to 0.14 and use llvm40
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
update pocl to 0.14
patch (text/plain), 12.61 KB, created by
Matthew Rezny
on 2017-04-11 11:38:28 UTC
(
hide
)
Description:
update pocl to 0.14
Filename:
MIME Type:
Creator:
Matthew Rezny
Created:
2017-04-11 11:38:28 UTC
Size:
12.61 KB
patch
obsolete
>Index: lang/pocl/Makefile >=================================================================== >--- lang/pocl/Makefile (revision 438199) >+++ lang/pocl/Makefile (working copy) >@@ -1,8 +1,7 @@ > # $FreeBSD$ > > PORTNAME= pocl >-PORTVERSION= 0.13 >-PORTREVISION= 1 >+PORTVERSION= 0.14 > CATEGORIES= lang > MASTER_SITES= SF/pocl \ > http://portablecl.org/downloads/ >@@ -20,28 +19,24 @@ > libltdl.so:devel/libltdl > RUN_DEPENDS= llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} > >-CONFLICTS= freeocl[0-9]* >- > BROKEN_FreeBSD_10= pocl is not supported on 10.x >-ONLY_FOR_ARCHS= amd64 >-ONLY_FOR_ARCHS_REASON_amd64= only tested on amd64 >+ONLY_FOR_ARCHS= i386 amd64 >+ONLY_FOR_ARCHS_REASON= only tested on x86 > >-LLVM_VERSION= 38 >+LLVM_VERSION= ${MESA_LLVM_VER:U40} > >-GNU_CONFIGURE= yes > USE_LDCONFIG= yes > USE_GL= yes >-USES= gmake localbase ncurses pathfix pkgconfig libtool:keepla >+USE_CXXSTD= gnu++11 >+USES= cmake gmake localbase ncurses pathfix pkgconfig libtool:keepla >+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} > >-INSTALL_TARGET= install-strip >- >-MAKE_ARGS+= PKGCONFIGDIR=${PREFIX}/libdata/pkgconfig >- >-CONFIGURE_ENV= LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \ >- CLANGXX_FLAGS=-std=gnu++11 >+CMAKE_ARGS= -DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \ >+ -DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \ >+ -DKERNELLIB_HOST_CPU_VARIANTS="distro" > # needed for the libltdl configure check > LDFLAGS+= -L${LOCALBASE}/lib >-PLIST_SUB= OPSYS=${OPSYS:tl} ARCH=${ARCH} >+PLIST_SUB= OPSYS=${OPSYS:tl} ARCH=${ARCH:C/amd64/x86_64/} > > ALL_TARGET= all > >@@ -48,18 +43,21 @@ > OCL_ICD_VENDORS?= ${PREFIX}/etc/OpenCL/vendors > > OPTIONS_DEFINE= DEBUG >- > OPTIONS_GROUP= TEST > OPTIONS_GROUP_TEST= OCLBOOK > > OCLBOOK_DESC= Tests from the OpenCL book >-DEBUG_DESC= Debug build of pocl > >-OCLBOOK_CONFIGURE_ENABLE= enable_testsuites="opencl-book-samples,cloverleaf,opencl_book_samples,halide,vexcl" >-OCLBOOK_ALL_TARGET= check >+DEBUG_CMAKE_BOOL_ON= WITH_DEBUG > >-DEBUG_CONFIGURE_ENABLE= debug >+OCLBOOK_CMAKE_OFF= -DENABLE_TESTSUITES="" >+OCLBOOK_CMAKE_ON= -DENABLE_TESTSUITES="all" >+OCLBOOK_ALL_TARGET= test > >-TEST_TARGET= check >+TEST_TARGET= test > >+post-patch: >+ @${REINPLACE_CMD} -e 's/AMD64/amd64/' -e 's/i\.86/i386/' \ >+ ${WRKSRC}/CMakeLists.txt >+ > .include <bsd.port.mk> >Index: lang/pocl/distinfo >=================================================================== >--- lang/pocl/distinfo (revision 438199) >+++ lang/pocl/distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1479738879 >-SHA256 (pocl-0.13.tar.gz) = a17f37d8f26819c0c8efc6de2b57f67a0c8a81514fc9cd5005434e49d67499f9 >-SIZE (pocl-0.13.tar.gz) = 1901208 >+TIMESTAMP = 1491868935 >+SHA256 (pocl-0.14.tar.gz) = 2127bf925a91fbbe3daf2f1bac0da5c8aceb16e2a9434977a3057eade974106a >+SIZE (pocl-0.14.tar.gz) = 1231630 >Index: lang/pocl/files/patch-Makefile.in >=================================================================== >--- lang/pocl/files/patch-Makefile.in (revision 438199) >+++ lang/pocl/files/patch-Makefile.in (nonexistent) >@@ -1,25 +0,0 @@ >-First part: this is false, this was due to a libtool bug, which is fixed now >-Second part: cmp --quiet is long for the -s option, use that since FreeBSD >-cmp doesn't have the long option. >- >---- Makefile.in.orig 2016-09-13 22:57:13.327123000 +0200 >-+++ Makefile.in 2016-09-13 23:01:18.738696000 +0200 >-@@ -116,8 +116,7 @@ >- @POCL_ANDROID_FALSE@am__append_1 = scripts examples tests >- >- #TODO: this naming scheme is used on other platforms (primarly BSDs?) too >--@BUILD_ICD_TRUE@@FREEBSD_HOST_OS_TRUE@am__append_2 = -e 's,so.VER,so.$(LIB_CURRENT_VERSION),g' >--@BUILD_ICD_TRUE@@FREEBSD_HOST_OS_FALSE@am__append_3 = -e 's,so.VER,so.$(LIB_FIRST_VERSION).$(LIB_AGE_VERSION).$(LIB_REVISION_VERSION),g' >-+@BUILD_ICD_TRUE@am__append_3 = -e 's,so.VER,so.$(LIB_FIRST_VERSION).$(LIB_AGE_VERSION).$(LIB_REVISION_VERSION),g' >- @BUILD_ICD_TRUE@am__append_4 = pocl.icd >- @BUILD_ICD_TRUE@am__append_5 = pocl.icd >- subdir = . >-@@ -1076,7 +1075,7 @@ >- echo "#define PKGDATADIR \"${pkgdatadir}\"" > $@.new >- echo "#define PKGLIBEXECDIR \"${pkglibexecdir}\"" >> $@.new >- echo "#define PKGINCLUDEDIR \"${pkgincludedir}\"" >> $@.new >-- @if cmp --quiet $@.new $@ ; then \ >-+ @if cmp -s $@.new $@ ; then \ >- : "Paths not changed" ;\ >- $(RM) $@.new ;\ >- else \ > >Property changes on: lang/pocl/files/patch-Makefile.in >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: lang/pocl/files/patch-lib_CL_devices_cpuinfo.c >=================================================================== >--- lang/pocl/files/patch-lib_CL_devices_cpuinfo.c (revision 438199) >+++ lang/pocl/files/patch-lib_CL_devices_cpuinfo.c (working copy) >@@ -1,5 +1,5 @@ >---- lib/CL/devices/cpuinfo.c.orig 2016-11-20 11:31:19.521203000 +0100 >-+++ lib/CL/devices/cpuinfo.c 2016-11-20 11:29:24.502817000 +0100 >+--- lib/CL/devices/cpuinfo.c.orig 2017-04-05 14:15:40 UTC >++++ lib/CL/devices/cpuinfo.c > @@ -31,9 +31,13 @@ > # include "vccompat.hpp" > #endif >@@ -10,16 +10,45 @@ > #include "config.h" > #include "cpuinfo.h" > >-+#if 0 >- const char* cpuinfo = "/proc/cpuinfo"; >++#ifdef __linux__ >+ static const char* cpuinfo = "/proc/cpuinfo"; > #define MAX_CPUINFO_SIZE 64*1024 > //#define DEBUG_POCL_CPUINFO >-@@ -152,8 +156,29 @@ pocl_cpuinfo_detect_max_clock_frequency( >+@@ -153,8 +157,29 @@ pocl_cpuinfo_detect_max_clock_frequency( > } > return -1; > } >++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) >++/** >++ * Detects the maximum clock frequency of the CPU. >++ * >++ * Assumes all cores have the same max clock freq. >++ * >++ * @return The clock frequency in MHz. >++ */ >++int >++pocl_cpuinfo_detect_max_clock_frequency() >++{ >++ //XXX PLEASE NOTE, THIS IS NOT TOO PORTABLE (AND/OR ACCURATE)! >++ const char mib[] = "hw.clockrate"; >++ int clockrate; >++ size_t size = sizeof(clockrate); >++ >++ sysctlbyname(mib, (void *)&clockrate, &size, NULL, 0); >+ >++ return clockrate; >++ } > +#endif >-+ >+ >++#ifdef __linux__ >+ /** >+ * Detects the number of parallel hardware threads supported by >+ * the CPU by parsing the cpuinfo. >+@@ -232,6 +257,27 @@ pocl_cpuinfo_detect_compute_unit_count() >+ } >+ return -1; >+ } >++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) > +/** > + * Detects the number of parallel hardware threads supported by > + * the CPU. >@@ -31,56 +60,27 @@ > +{ > + int mib[2], nocpus; > + size_t len; >- >++ > + mib[0] = CTL_HW; > + mib[1] = HW_NCPU; > + len = sizeof(nocpus); > + sysctl(mib, 2, &nocpus, &len, NULL, 0); >- >++ > + return nocpus; > +} >-+ >-+#if 0 >- /** >- * Detects the number of parallel hardware threads supported by >- * the CPU by parsing the cpuinfo. >-@@ -231,6 +256,27 @@ pocl_cpuinfo_detect_compute_unit_count() >- } >- return -1; >- } > +#endif >-+ >-+/** >-+ * Detects the maximum clock frequency of the CPU. >-+ * >-+ * Assumes all cores have the same max clock freq. >-+ * >-+ * @return The clock frequency in MHz. >-+ */ >-+int >-+pocl_cpuinfo_detect_max_clock_frequency() >-+{ >-+ //XXX PLEASE NOTE, THIS IS NOT TOO PORTABLE (AND/OR ACCURATE)! >-+ const char mib[] = "hw.clockrate"; >-+ size_t size = sizeof(int); >-+ int clockrate; >-+ >-+ sysctlbyname(mib, (void *)&clockrate, &size, NULL, 0); >-+ >-+ return clockrate; >-+ } > > #ifdef POCL_ANDROID > >-@@ -269,6 +315,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_ >+@@ -270,6 +316,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_ > * short_name is in the .data anyways.*/ > device->long_name = device->short_name; > >-+#if 0 >++#ifdef __linux__ > /* default vendor and vendor_id, in case it cannot be found by other means */ > device->vendor = cpuvendor_default; > if (device->vendor_id == 0) >-@@ -317,6 +364,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_ >+@@ -318,6 +365,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_ > char *new_name = (char*)malloc (len); > snprintf (new_name, len, "%s-%s", device->short_name, start); > device->long_name = new_name; >Index: lang/pocl/files/patch-lib_CL_pocl__binary.c >=================================================================== >--- lang/pocl/files/patch-lib_CL_pocl__binary.c (nonexistent) >+++ lang/pocl/files/patch-lib_CL_pocl__binary.c (working copy) >@@ -0,0 +1,11 @@ >+--- lib/CL/pocl_binary.c.orig 2017-04-05 14:15:40 UTC >++++ lib/CL/pocl_binary.c >+@@ -36,7 +36,7 @@ >+ #include <libgen.h> >+ >+ #ifndef __APPLE__ >+- #include <endian.h> >++ #include <sys/endian.h> >+ #else >+ #include <libkern/OSByteOrder.h> >+ #define htole16(x) OSSwapHostToLittleInt16(x) > >Property changes on: lang/pocl/files/patch-lib_CL_pocl__binary.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: lang/pocl/files/patch-scripts_Makefile.in >=================================================================== >--- lang/pocl/files/patch-scripts_Makefile.in (revision 438199) >+++ lang/pocl/files/patch-scripts_Makefile.in (nonexistent) >@@ -1,21 +0,0 @@ >-dirty hack, pocl-standalone will be installed into stage with >-r-xr-xr-x permissions. So writing to it is problemetic. give the file write >-permission and take it away after. >- >-Upstream (pre 0.14) will be using cmake so this hack is only temporary. >- >---- scripts/Makefile.in.orig 2016-09-13 22:10:48.091956000 +0200 >-+++ scripts/Makefile.in 2016-09-13 22:13:33.388168000 +0200 >-@@ -651,10 +651,11 @@ >- >- install-exec-hook: $(bin_SCRIPTS) >- for f in $(bin_SCRIPTS) ; do \ >-+ chmod +w "$(DESTDIR)$(bindir)/$$f" ; \ >- sed -e '/^# BEGIN REMOVE ONCE INSTALLED$$/,/^# END REMOVE ONCE INSTALLED$$/d' \ >- > "$(DESTDIR)$(bindir)/$$f" \ >- < "$$f" && \ >-- chmod +x "$(DESTDIR)$(bindir)/$$f" ; \ >-+ chmod +x-w "$(DESTDIR)$(bindir)/$$f" ; \ >- done >- >- # Tell versions [3.59,3.63) of GNU make to not export all variables. > >Property changes on: lang/pocl/files/patch-scripts_Makefile.in >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: lang/pocl/files/patch-tests_regression_test__issue__445.cpp >=================================================================== >--- lang/pocl/files/patch-tests_regression_test__issue__445.cpp (nonexistent) >+++ lang/pocl/files/patch-tests_regression_test__issue__445.cpp (working copy) >@@ -0,0 +1,11 @@ >+--- tests/regression/test_issue_445.cpp.orig 2017-04-05 14:15:40 UTC >++++ tests/regression/test_issue_445.cpp >+@@ -29,7 +29,7 @@ private_local_array(__global int *__rest >+ } >+ )CLC"; >+ >+-int main(int, char *) >++int main(int, char **) >+ { >+ try { >+ int N = 9; > >Property changes on: lang/pocl/files/patch-tests_regression_test__issue__445.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: lang/pocl/pkg-plist >=================================================================== >--- lang/pocl/pkg-plist (revision 438199) >+++ lang/pocl/pkg-plist (working copy) >@@ -1,27 +1,25 @@ >-bin/pocl-standalone >+bin/poclcc > etc/OpenCL/vendors/pocl.icd > include/poclu.h >-lib/libpocl.a >-lib/libpocl.la > lib/libpocl.so > lib/libpocl.so.1 >-lib/libpocl.so.1.6.0 >-lib/libpoclu.a >-lib/libpoclu.la >+lib/libpocl.so.1.7.0 > lib/libpoclu.so > lib/libpoclu.so.1 >-lib/libpoclu.so.1.6.0 >-lib/pocl/llvmopencl.a >-lib/pocl/llvmopencl.la >-lib/pocl/llvmopencl.so >-lib/pocl/llvmopencl.so.7 >-lib/pocl/llvmopencl.so.7.0.0 >+lib/libpoclu.so.1.7.0 >+lib/pocl/libllvmopencl.so > libdata/pkgconfig/pocl.pc >+%%DATADIR%%/include/_enable_all_exts.h > %%DATADIR%%/include/_kernel.h > %%DATADIR%%/include/_kernel_c.h > %%DATADIR%%/include/_kernel_constants.h > %%DATADIR%%/include/pocl.h > %%DATADIR%%/include/pocl_device.h >-%%DATADIR%%/include/pocl_tests.h > %%DATADIR%%/include/pocl_types.h >-%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%.bc >+%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx.bc >+%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx2.bc >+%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx512.bc >+%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-avx_fma4.bc >+%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-sse2.bc >+%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-sse41.bc >+%%DATADIR%%/kernel-%%ARCH%%-unknown-%%OPSYS%%%%OSREL%%-ssse3.bc
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 218332
:
181431
|
181686
|
182267