Index: lang/pocl/Makefile =================================================================== --- lang/pocl/Makefile (revision 437570) +++ lang/pocl/Makefile (working copy) @@ -1,8 +1,8 @@ # $FreeBSD$ PORTNAME= pocl -PORTVERSION= 0.13 -PORTREVISION= 1 +PORTVERSION= 0.14 +DISTVERSIONSUFFIX=-rc1 CATEGORIES= lang MASTER_SITES= SF/pocl \ http://portablecl.org/downloads/ @@ -20,28 +20,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 +44,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 Index: lang/pocl/distinfo =================================================================== --- lang/pocl/distinfo (revision 437570) +++ 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 = 1490755247 +SHA256 (pocl-0.14-rc1.tar.gz) = 2f2727167690718f86348c75aedf9c3706365c45741b1d135497e77258612159 +SIZE (pocl-0.14-rc1.tar.gz) = 1227953 Index: lang/pocl/files/patch-Makefile.in =================================================================== --- lang/pocl/files/patch-Makefile.in (revision 437570) +++ 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 437570) +++ 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-02-21 02:36:37 UTC ++++ lib/CL/devices/cpuinfo.c @@ -31,9 +31,13 @@ # include "vccompat.hpp" #endif @@ -10,16 +10,16 @@ #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; } +#endif -+ + +/** + * Detects the number of parallel hardware threads supported by + * the CPU. @@ -31,24 +31,24 @@ +{ + 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 + ++#ifdef __linux__ /** * 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() +@@ -232,6 +257,28 @@ pocl_cpuinfo_detect_compute_unit_count() } return -1; } -+#endif ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + +/** + * Detects the maximum clock frequency of the CPU. @@ -69,18 +69,19 @@ + + return clockrate; + } ++#endif #ifdef POCL_ANDROID -@@ -269,6 +315,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_ +@@ -270,6 +317,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 +366,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-02-21 02:36:37 UTC ++++ lib/CL/pocl_binary.c +@@ -36,7 +36,7 @@ + #include + + #ifndef __APPLE__ +- #include ++ #include + #else + #include + #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 437570) +++ 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/pkg-plist =================================================================== --- lang/pocl/pkg-plist (revision 437570) +++ 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