Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Dec 2019 17:31:44 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r519222 - in head: devel devel/intel-graphics-compiler devel/intel-graphics-compiler/files devel/opencl-clang devel/spirv-llvm-translator lang lang/compute-runtime lang/compute-runtime/...
Message-ID:  <201912071731.xB7HVifm025376@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Dec  7 17:31:44 2019
New Revision: 519222
URL: https://svnweb.freebsd.org/changeset/ports/519222

Log:
  devel/compute-runtime: add new port
  
  Tested by:	clpeak, waifu2x-converter-cpp via drm-v4.9 on Skylake
  
  The Intel(R) Graphics Compute Runtime for OpenCL(TM) is an open source
  project to converge Intel's development efforts on OpenCL(TM) compute
  stacks supporting the GEN graphics hardware architecture.
  
  https://01.org/compute-runtime

Added:
  head/devel/intel-graphics-compiler/
  head/devel/intel-graphics-compiler/Makefile   (contents, props changed)
  head/devel/intel-graphics-compiler/distinfo   (contents, props changed)
  head/devel/intel-graphics-compiler/files/
  head/devel/intel-graphics-compiler/files/patch-alloca   (contents, props changed)
  head/devel/intel-graphics-compiler/files/patch-limits   (contents, props changed)
  head/devel/intel-graphics-compiler/files/patch-process-name   (contents, props changed)
  head/devel/intel-graphics-compiler/files/patch-unix   (contents, props changed)
  head/devel/intel-graphics-compiler/pkg-descr   (contents, props changed)
  head/devel/intel-graphics-compiler/pkg-plist   (contents, props changed)
  head/devel/opencl-clang/
  head/devel/opencl-clang/Makefile   (contents, props changed)
  head/devel/opencl-clang/distinfo   (contents, props changed)
  head/devel/opencl-clang/pkg-descr   (contents, props changed)
  head/devel/spirv-llvm-translator/
  head/devel/spirv-llvm-translator/Makefile   (contents, props changed)
  head/devel/spirv-llvm-translator/distinfo   (contents, props changed)
  head/devel/spirv-llvm-translator/pkg-descr   (contents, props changed)
  head/lang/compute-runtime/
  head/lang/compute-runtime/Makefile   (contents, props changed)
  head/lang/compute-runtime/distinfo   (contents, props changed)
  head/lang/compute-runtime/files/
  head/lang/compute-runtime/files/patch-backtrace   (contents, props changed)
  head/lang/compute-runtime/files/patch-clang9   (contents, props changed)
  head/lang/compute-runtime/files/patch-clock_gettime   (contents, props changed)
  head/lang/compute-runtime/files/patch-i386   (contents, props changed)
  head/lang/compute-runtime/files/patch-includes   (contents, props changed)
  head/lang/compute-runtime/files/patch-libc++   (contents, props changed)
  head/lang/compute-runtime/files/patch-mmap   (contents, props changed)
  head/lang/compute-runtime/files/patch-rtld   (contents, props changed)
  head/lang/compute-runtime/files/patch-unix   (contents, props changed)
  head/lang/compute-runtime/files/patch-userptr   (contents, props changed)
  head/lang/compute-runtime/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile   (contents, props changed)
  head/lang/Makefile   (contents, props changed)

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sat Dec  7 17:24:52 2019	(r519221)
+++ head/devel/Makefile	Sat Dec  7 17:31:44 2019	(r519222)
@@ -1011,6 +1011,7 @@
     SUBDIR += iniparser
     SUBDIR += initutil
     SUBDIR += injeqt
+    SUBDIR += intel-graphics-compiler
     SUBDIR += interactive_rebase_tool
     SUBDIR += ioncube
     SUBDIR += ipython
@@ -1664,6 +1665,7 @@
     SUBDIR += open-beagle
     SUBDIR += open-usp-tukubai
     SUBDIR += opencl
+    SUBDIR += opencl-clang
     SUBDIR += opencvs
     SUBDIR += opendht
     SUBDIR += opengrok
@@ -6428,6 +6430,7 @@
     SUBDIR += spdlog
     SUBDIR += spice-protocol
     SUBDIR += spin
+    SUBDIR += spirv-llvm-translator
     SUBDIR += spirv-tools
     SUBDIR += splint
     SUBDIR += spread-sheet-widget

Added: head/devel/intel-graphics-compiler/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/Makefile	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,53 @@
+# $FreeBSD$
+
+PORTNAME=	intel-graphics-compiler
+DISTVERSIONPREFIX=	igc-
+DISTVERSION=	1.0.2990
+CATEGORIES=	devel
+
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	add5ac2f64f3.patch:-p1
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Intel Graphics Compiler for OpenCL
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
+
+ONLY_FOR_ARCHS=	amd64 i386
+ONLY_FOR_ARCHS_REASON=	Only Intel GPUs on x86 are supported
+
+LIB_DEPENDS=	libopencl-clang.so:devel/opencl-clang
+
+USES=		bison cmake compiler:c++17-lang python:build
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+GH_ACCOUNT=	intel
+PLIST_SUB=	ARCH_SUFX=${ARCH:S/i386/32/:S/amd//:S/x86_//}
+
+post-patch:
+# lang/python* don't install unsuffixed symlinks
+	@${REINPLACE_CMD} -i .python \
+		-e '/EXECUTABLE/s/"python"/"${PYTHON_CMD:T}"/' \
+		-e '/IGC_PYTHON/s/"python"/"${PYTHON_CMD:T}"/' \
+		${WRKSRC}/IGC/CMakeLists.txt \
+		${WRKSRC}/IGC/BiFModule/CMakeLists.txt
+# devel/llvm* have different naming from upstream under PATH
+	@${REINPLACE_CMD} -e '/clang-\$$/ { s//clang$$/; \
+			s/MAJOR}/&$${LLVM_VERSION_MINOR}/; }' \
+		${WRKSRC}/IGC/BiFModule/CMakeLists.txt
+# Silence -Wmacro-redefined to expose __fastcall misuse
+	@${REINPLACE_CMD} -e '/__fastcall/d' \
+		${WRKSRC}/inc/common/UFO/portable_compiler.h
+# No need to abort on every benign warning enabled by default
+	@${REINPLACE_CMD} -e 's/"-Werror"//; /-Werror/d' \
+		${WRKSRC}/IGC/CMakeLists.txt
+
+pre-configure:
+# Only one libLLVM can be loaded, so use the same version as devel/opencl-clang
+	@for f in ${LOCALBASE}/lib/libopencl-clang.so.*; do \
+		${REINPLACE_CMD} "/set.*LLVM_VERSION/s/\".*\"/\"$${f##*so.}\"/" \
+			${WRKSRC}/IGC/CMakeLists.txt; \
+	done
+
+.include <bsd.port.mk>

Added: head/devel/intel-graphics-compiler/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/distinfo	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,5 @@
+TIMESTAMP = 1574816720
+SHA256 (intel-intel-graphics-compiler-igc-1.0.2990_GH0.tar.gz) = a4823e365c939254899cead5c9a23ada4d8c0f5ae395eef5f2a46cc82b59315f
+SIZE (intel-intel-graphics-compiler-igc-1.0.2990_GH0.tar.gz) = 5930890
+SHA256 (add5ac2f64f3.patch) = 4de0b73bf73d786e3aa6e55bb9bf4a45ac44ee3ef5177a64f50d869bb8e81285
+SIZE (add5ac2f64f3.patch) = 3862

Added: head/devel/intel-graphics-compiler/files/patch-alloca
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/files/patch-alloca	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,34 @@
+<alloca.h> is implicitly included by <stdlib.h> on Linux
+
+In file included from visa/iga/IGAExe/assemble.cpp:27:
+In file included from visa/iga/IGAExe/iga_main.hpp:29:
+visa/iga/IGAExe/fatal.hpp:33:10: fatal error: 'alloca.h' file not found
+#include <alloca.h>
+         ^~~~~~~~~~
+
+visa/iga/IGALibrary/strings.cpp:41:10: fatal error: 'alloca.h' file not found
+#include <alloca.h> /* for alloca */
+         ^~~~~~~~~~
+
+--- visa/iga/IGAExe/fatal.hpp.orig	2019-11-27 01:05:20 UTC
++++ visa/iga/IGAExe/fatal.hpp
+@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include <Windows.h>
+ #include <malloc.h>
+ #else
+-#include <alloca.h>
++#include <stdlib.h>
+ #endif
+ #ifdef _MSC_VER
+ #define VSCPRINTF(PAT,VA) \
+--- visa/iga/IGALibrary/strings.cpp.orig	2019-11-27 01:05:20 UTC
++++ visa/iga/IGALibrary/strings.cpp
+@@ -38,7 +38,7 @@ using namespace iga;
+ #include <Windows.h>
+ #include <malloc.h> /* for alloca */
+ #else
+-#include <alloca.h> /* for alloca */
++#include <stdlib.h> /* for alloca */
+ #endif
+ 
+ std::string iga::format(const char *pat, ...)

Added: head/devel/intel-graphics-compiler/files/patch-limits
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/files/patch-limits	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,16 @@
+<linux/limits.h> is implicitly included via <limits.h> but not required here
+
+IGC/OCLFE/igd_fcl_mcl/source/LoadBuffer.cpp:40:10: fatal error: 'linux/limits.h' file not found
+#include <linux/limits.h>
+         ^~~~~~~~~~~~~~~~
+
+--- IGC/OCLFE/igd_fcl_mcl/source/LoadBuffer.cpp.orig	2019-11-27 01:05:20 UTC
++++ IGC/OCLFE/igd_fcl_mcl/source/LoadBuffer.cpp
+@@ -37,7 +37,6 @@ using namespace llvm;
+ #include <inttypes.h>
+ #include <libgen.h>
+ #include <link.h>
+-#include <linux/limits.h>
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <unistd.h>

Added: head/devel/intel-graphics-compiler/files/patch-process-name
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/files/patch-process-name	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,16 @@
+/proc is gone on DragonFly and OpenBSD but deprecated on FreeBSD and NetBSD
+
+--- IGC/common/SysUtils.cpp.orig	2019-11-27 01:05:20 UTC
++++ IGC/common/SysUtils.cpp
+@@ -82,6 +82,11 @@ namespace IGC
+             if (!in.good())
+                 assert(0 && "Error reading from cmdline pseudo file");
+ 
++#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
++      defined(__OpenBSD__) || defined(__sun)
++            // KERN_PROC_ARGS returns similar value to /proc/<pid>/cmdline but as
++            // neither invocation path nor arguments are used just ask libc
++            ret = getprogname();
+ #elif defined(_WIN64) || defined(_WIN32)
+             ret.resize(MAX_PATH);
+             DWORD size = ::GetModuleFileNameA(NULL, &ret[0], ret.size());

Added: head/devel/intel-graphics-compiler/files/patch-unix
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/files/patch-unix	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,309 @@
+Relax recent Linux checks for the code works on any non-Windows platform.
+
+CMake Error at IGC/CMakeLists.txt:1974 (message):
+  IGC_OPTION__ARCHITECTURE_TARGET: Target architecture is not specified and
+  cannot be deduced from context.
+
+  Please specify one, e.g.  Windows32, Linux64, Android32, ...
+
+--- IGC/CMakeLists.txt.orig	2019-11-27 01:05:20 UTC
++++ IGC/CMakeLists.txt
+@@ -834,11 +834,11 @@ function(igc_arch_detect targetArchVarName hostArchVar
+       set(_targetArchitecture "Windows32")
+     endif()
+   # Use system processor set by toolchain or CMake.
+-  elseif(ANDROID OR (CMAKE_SYSTEM_NAME MATCHES "Linux")
++  elseif(ANDROID OR (UNIX AND NOT APPLE)
+       )
+     if(ANDROID)
+       set(_targetArchOS "Android")
+-    elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
++    elseif(UNIX AND NOT APPLE)
+       set(_targetArchOS "Linux")
+     endif()
+ 
+@@ -865,9 +865,9 @@ function(igc_arch_detect targetArchVarName hostArchVar
+       set(_hostArchitecture "Windows32")
+     endif()
+   # Use 'uname -m' to detect kernel architecture.
+-  elseif((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
++  elseif((UNIX AND NOT APPLE)
+       )
+-    if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
++    if(UNIX AND NOT APPLE)
+       set(_hostArchOS "Linux")
+     endif()
+ 
+@@ -2171,7 +2171,7 @@ endif()
+ 
+ # NOTE: LLVM_ON_UNIX is also true for Android (CMAKE_SYSTEM_NAME specified by Android toolchain file is also "Linux",
+ # but we should make sure so there is no errors in our assumptions).
+-if((CMAKE_SYSTEM_NAME MATCHES "Linux") OR ANDROID)
++if((UNIX AND NOT APPLE) OR ANDROID)
+   set(LLVM_ON_UNIX ON)
+ else()
+   set(LLVM_ON_UNIX OFF)
+--- 3d/common/iStdLib/File.h.orig	2019-11-27 01:05:20 UTC
++++ 3d/common/iStdLib/File.h
+@@ -105,12 +105,9 @@ inline DWORD GetModuleFileName( char* pFileName, DWORD
+ #elif defined(ISTDLIB_UMD)
+     #if defined(_WIN32)
+         return ::GetModuleFileNameA( NULL, pFileName, bufSize );
+-    #elif defined(__linux__)
++    #else
+         //TODO: add Linux implementation.
+         return 0;
+-    #else
+-        // TO DO: replace with non-Windows version
+-        #error "TODO implement non-Windows equivalent of GetModuleFileName"
+     #endif
+ #else
+     // this compilation path is not intended
+--- 3d/common/iStdLib/Object.h.orig	2019-11-27 01:05:20 UTC
++++ 3d/common/iStdLib/Object.h
+@@ -150,7 +150,7 @@ inline long CObject<CAllocatorType>::Acquire( void )
+     ASSERT( m_RefCount >= 0 );
+     ASSERT( m_RefCount < LONG_MAX );
+ 
+-#if defined(ISTDLIB_MT) && defined(__linux__)
++#if defined(ISTDLIB_MT) && defined(__GNUC__)
+     __sync_fetch_and_add(&m_RefCount, 1);
+ #elif defined(ISTDLIB_MT)
+     ::InterlockedIncrement(&m_RefCount);
+@@ -182,7 +182,7 @@ inline long CObject<CAllocatorType>::Release( void )
+ {
+     ASSERT( m_RefCount > 0 );
+ 
+-#if defined(ISTDLIB_MT) && defined(__linux__)
++#if defined(ISTDLIB_MT) && defined(__GNUC__)
+     __sync_sub_and_fetch(&m_RefCount, 1);
+ #elif defined(ISTDLIB_MT)
+     ::InterlockedDecrement(&m_RefCount);
+--- 3d/common/iStdLib/utility.h.orig	2019-11-27 01:05:20 UTC
++++ 3d/common/iStdLib/utility.h
+@@ -431,7 +431,7 @@ __forceinline DWORD bsr64( const unsigned long long in
+     _BitScanReverse64( &index, static_cast<_int64>( mask ) );
+     return static_cast<DWORD>( index );
+ 
+-#elif defined __linux__
++#elif defined __GNUC__
+     return static_cast<unsigned int>( 63 - __builtin_clzll( mask ) );
+ 
+ #else
+@@ -464,7 +464,7 @@ __forceinline DWORD bsr( const DWORD mask )
+     _BitScanReverse( &index, mask );
+     return static_cast<DWORD>(index);
+ 
+-#elif defined __linux__
++#elif defined __GNUC__
+     return static_cast<unsigned int>( 31 - __builtin_clz( mask ) );
+ 
+ #else
+@@ -497,7 +497,7 @@ __forceinline DWORD bsf64( const unsigned long long in
+     _BitScanForward64( &index, static_cast<_int64>( mask ) );
+     return static_cast<DWORD>( index );
+ 
+-#elif defined __linux__
++#elif defined __GNUC__
+     return static_cast<unsigned int>( __builtin_ffsll( mask ) - 1 );
+ 
+ #else
+@@ -529,7 +529,7 @@ __forceinline DWORD bsf( const DWORD mask )
+     _BitScanForward( &index, mask );
+     return index;
+ 
+-#elif defined __linux__
++#elif defined __GNUC__
+     return static_cast<unsigned int>( __builtin_ffsl( mask ) - 1 );
+ 
+ #else
+--- IGC/AdaptorCommon/customApi.cpp.orig	2019-11-27 01:05:20 UTC
++++ IGC/AdaptorCommon/customApi.cpp
+@@ -457,7 +457,7 @@ namespace IGC
+                 return "";
+             IGCBaseFolder = "/sdcard/intel/igc/";
+ 
+-#elif defined __linux__
++#elif !defined __APPLE__
+         if (!IGC_IS_FLAG_ENABLED(DumpToCustomDir))
+         {
+             IGCBaseFolder = "/tmp/IntelIGC/";
+@@ -560,7 +560,7 @@ namespace IGC
+ 
+                 g_shaderOutputFolder = "";
+ 
+-#elif defined __linux__
++#elif !defined __APPLE__
+             if (!IGC_IS_FLAG_ENABLED(DumpToCurrentDir) && g_shaderOutputFolder == "" && !IGC_IS_FLAG_ENABLED(DumpToCustomDir))
+             {
+                 bool needMkdir = false;
+--- IGC/AdaptorOCL/CLElfLib/CLElfTypes.h.orig	2019-11-27 01:05:20 UTC
++++ IGC/AdaptorOCL/CLElfLib/CLElfTypes.h
+@@ -30,7 +30,7 @@ Abstract:  Defines the types used for ELF headers/sect
+ \******************************************************************************/
+ #pragma once
+ 
+-#if defined(__linux__) && defined(OGL)
++#if !defined(__APPLE__) && !defined(_WIN32) && defined(OGL)
+     #include "os_inc.h"
+ #endif
+ 
+@@ -38,7 +38,7 @@ Abstract:  Defines the types used for ELF headers/sect
+     #include <inttypes.h>
+ #endif
+ 
+-#if defined(__linux__)
++#if !defined(__APPLE__) && !defined(_WIN32)
+     #include "elf.h"
+ #endif
+ 
+--- IGC/AdaptorOCL/OCL/sp/gtpin_igc_ocl.h.orig	2019-11-27 01:05:20 UTC
++++ IGC/AdaptorOCL/OCL/sp/gtpin_igc_ocl.h
+@@ -38,7 +38,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #define MY_CALLINGSTD  _fastcall
+ #define MY_CDECL       _cdecl
+ 
+-#elif defined(ANDROID) || defined (__linux__)
++#elif defined(__GNUC__)
+ 
+ // Linux, Android
+ #define MY_EXTERN_C    extern "C"
+--- IGC/GenISAIntrinsics/GenIntrinsics.h.orig	2019-11-27 01:05:20 UTC
++++ IGC/GenISAIntrinsics/GenIntrinsics.h
+@@ -59,7 +59,7 @@ namespace GenISAIntrinsic {
+   /// using iAny, fAny, vAny, or iPTRAny).  For a declaration of an overloaded
+   /// intrinsic, Tys must provide exactly one type for each overloaded type in
+   /// the intrinsic.
+-#if defined(ANDROID) || defined(__linux__)
++#if defined(__GNUC__)
+   __attribute__ ((visibility ("default"))) Function *getDeclaration(Module *M, ID id, ArrayRef<Type*> Tys = None);
+ #else
+   Function *getDeclaration(Module *M, ID id, ArrayRef<Type*> Tys = None);
+--- IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp.orig	2019-11-27 01:05:20 UTC
++++ IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp
+@@ -65,9 +65,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #if defined(_WIN32 )|| defined( _WIN64 )
+ #include <direct.h>
+ #include <process.h>
+-#endif
+-
+-#if defined __linux__
++#elif !defined(__APPLE__)
+ #include "iStdLib/File.h"
+ #endif
+ 
+@@ -311,7 +309,7 @@ namespace FCL
+ 
+             IGCBaseFolder = pathBuf;
+         }
+-#elif defined __linux__
++#elif !defined(__APPLE__)
+         if (!FCL_IGC_IS_FLAG_ENABLED(DumpToCustomDir))
+         {
+             IGCBaseFolder = "/tmp/IntelIGC/";
+@@ -387,7 +385,7 @@ namespace FCL
+             iSTD::CreateAppOutputDir(pathBuf, 256, GetBaseIGCOutputFolder(), false, true, !FCL_IGC_IS_FLAG_ENABLED(ShaderDumpPidDisable));
+             g_shaderOutputFolder = pathBuf;
+         }
+-#elif defined __linux__
++#elif !defined(__APPLE__)
+         if (!FCL_IGC_IS_FLAG_ENABLED(DumpToCurrentDir) && g_shaderOutputFolder == "" && !FCL_IGC_IS_FLAG_ENABLED(DumpToCustomDir))
+         {
+             bool needMkdir = true;
+--- IGC/common/LLVMWarningsPop.hpp.orig	2019-11-27 01:05:20 UTC
++++ IGC/common/LLVMWarningsPop.hpp
+@@ -58,6 +58,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #   pragma  warning( pop )
+ #endif
+ 
+-#if defined(__linux__)
++#if defined(__GNUC__)
+ #   pragma GCC diagnostic pop
+ #endif
+--- IGC/common/LLVMWarningsPush.hpp.orig	2019-11-27 01:05:20 UTC
++++ IGC/common/LLVMWarningsPush.hpp
+@@ -55,13 +55,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #   pragma warning( push )
+ #endif
+ 
+-#if defined(__linux__)
++#if defined(__GNUC__)
+ #   pragma GCC diagnostic push
+ #endif
+ 
+ #include <llvm/Config/llvm-config.h>
+ 
+-#if defined(__linux__)
++#if defined(__GNUC__)
+ #    if __GNUC__ > 8
+ #        pragma GCC diagnostic ignored "-Winit-list-lifetime"
+ #    endif
+--- IGC/common/igc_regkeys.hpp.orig	2019-11-27 01:05:20 UTC
++++ IGC/common/igc_regkeys.hpp
+@@ -39,7 +39,7 @@ typedef char debugString[256];
+ #define IGC_DEBUG_VARIABLES
+ #endif
+ 
+-#if defined( __linux__ )
++#if !defined( __APPLE__ ) && !defined( _WIN32 )
+ #define IGC_DEBUG_VARIABLES
+ #endif
+ 
+@@ -67,7 +67,7 @@ struct SRegKeyVariableMetaData
+     }
+ };
+ 
+-#if defined ( __linux__ ) && !defined( _DEBUG ) && !defined( _INTERNAL )
++#if !defined ( _WIN32 ) && !defined( _DEBUG ) && !defined( _INTERNAL )
+ #define LINUX_RELEASE_MODE
+ #endif
+ 
+--- inc/common/Compiler/API/ShaderInstruction.h.orig	2019-11-27 01:05:20 UTC
++++ inc/common/Compiler/API/ShaderInstruction.h
+@@ -39,7 +39,7 @@ namespace USC
+ class CShaderDebugLocationInfo;
+ }
+ 
+-#if defined _DEBUG && !defined __linux__
++#if defined _DEBUG && defined _WIN32
+ #define USC_OPTIMIZING_COMPILER_TESTS
+ #endif
+ 
+--- visa/BuildCISAIRImpl.cpp.orig	2019-11-27 01:05:20 UTC
++++ visa/BuildCISAIRImpl.cpp
+@@ -680,7 +680,6 @@ extern void CISA_delete_buffer(YY_BUFFER_STATE buf);
+ 
+ int CISA_IR_Builder::ParseVISAText(const std::string& visaHeader, const std::string& visaText, const std::string& visaTextFile)
+ {
+-#if defined(__linux__) || defined(_WIN64) || defined(_WIN32)
+     // Direct output of parser to null
+ #if defined(_WIN64) || defined(_WIN32)
+     CISAout = fopen("nul", "w");
+@@ -740,16 +739,11 @@ int CISA_IR_Builder::ParseVISAText(const std::string& 
+     }
+ 
+     return CM_SUCCESS;
+-#else
+-    assert(0 && "Asm parsing not supported on this platform");
+-    return CM_FAILURE;
+-#endif
+ }
+ 
+ // Parses inline asm file from ShaderOverride
+ int CISA_IR_Builder::ParseVISAText(const std::string& visaFile)
+ {
+-#if defined(__linux__) || defined(_WIN64) || defined(_WIN32)
+     // Direct output of parser to null
+ #if defined(_WIN64) || defined(_WIN32)
+     CISAout = fopen("nul", "w");
+@@ -775,10 +769,6 @@ int CISA_IR_Builder::ParseVISAText(const std::string& 
+         fclose(CISAout);
+     }
+     return CM_SUCCESS;
+-#else
+-    assert(0 && "Asm parsing not supported on this platform");
+-    return CM_FAILURE;
+-#endif
+ }
+ 
+ // default size of the kernel mem manager in bytes

Added: head/devel/intel-graphics-compiler/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/pkg-descr	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,5 @@
+The Intel(R) Graphics Compiler for OpenCL(TM) is an LLVM-based
+compiler for OpenCL(TM) targeting Intel Gen graphics hardware
+architecture.
+
+WWW: https://01.org/compute-runtime

Added: head/devel/intel-graphics-compiler/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/intel-graphics-compiler/pkg-plist	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,104 @@
+bin/GenX_IR
+bin/iga%%ARCH_SUFX%%
+include/iga/iga.h
+include/iga/iga.hpp
+include/iga/igaEncoderWrapper.hpp
+include/iga/iga_bxml_enums.hpp
+include/iga/iga_bxml_ops.hpp
+include/iga/iga_types_ext.hpp
+include/iga/iga_types_swsb.hpp
+include/iga/igad.h
+include/iga/igax.hpp
+include/iga/kv.h
+include/iga/kv.hpp
+include/igc/cif/CMakeLists.txt
+include/igc/cif/cif/CMakeLists.txt
+include/igc/cif/cif/builtins/builtins_registry.cpp
+include/igc/cif/cif/builtins/builtins_registry.h
+include/igc/cif/cif/builtins/memory/buffer/buffer.h
+include/igc/cif/cif/builtins/memory/buffer/impl/buffer_impl.cpp
+include/igc/cif/cif/builtins/memory/buffer/impl/buffer_impl.h
+include/igc/cif/cif/common/cif.h
+include/igc/cif/cif/common/cif_main.h
+include/igc/cif/cif/common/coder.h
+include/igc/cif/cif/common/compatibility.h
+include/igc/cif/cif/common/id.h
+include/igc/cif/cif/common/library_api.h
+include/igc/cif/cif/common/library_handle.h
+include/igc/cif/cif/export/build/binary_version.h
+include/igc/cif/cif/export/cif_impl.h
+include/igc/cif/cif/export/cif_main.cpp
+include/igc/cif/cif/export/cif_main_impl.h
+include/igc/cif/cif/export/interface_creator.h
+include/igc/cif/cif/export/library_api.h
+include/igc/cif/cif/export/muiltiversion.h
+include/igc/cif/cif/export/pimpl_base.h
+include/igc/cif/cif/export/registry.cpp
+include/igc/cif/cif/export/registry.h
+include/igc/cif/cif/helpers/error.cpp
+include/igc/cif/cif/helpers/error.h
+include/igc/cif/cif/helpers/memory.h
+include/igc/cif/cif/import/cif_main.cpp
+include/igc/cif/cif/import/cif_main.h
+include/igc/cif/cif/import/library_api.h
+include/igc/cif/cif/macros/disable.h
+include/igc/cif/cif/macros/enable.h
+include/igc/cif/cif/os/lin/lin_library_handle.cpp
+include/igc/cif/cif/os/lin/lin_library_handle.h
+include/igc/cif/cif/os/win/win_library_handle.cpp
+include/igc/cif/cif/os/win/win_library_handle.h
+include/igc/cif/readme.txt
+include/igc/igc.opencl.h
+include/igc/ocl_igc_interface/code_type.h
+include/igc/ocl_igc_interface/fcl_ocl_device_ctx.h
+include/igc/ocl_igc_interface/fcl_ocl_translation_ctx.h
+include/igc/ocl_igc_interface/gt_system_info.h
+include/igc/ocl_igc_interface/igc_features_and_workarounds.h
+include/igc/ocl_igc_interface/igc_ocl_device_ctx.h
+include/igc/ocl_igc_interface/igc_ocl_translation_ctx.h
+include/igc/ocl_igc_interface/impl/fcl_ocl_device_ctx_impl.cpp
+include/igc/ocl_igc_interface/impl/fcl_ocl_device_ctx_impl.h
+include/igc/ocl_igc_interface/impl/fcl_ocl_translation_ctx_impl.cpp
+include/igc/ocl_igc_interface/impl/fcl_ocl_translation_ctx_impl.h
+include/igc/ocl_igc_interface/impl/gt_system_info_impl.cpp
+include/igc/ocl_igc_interface/impl/gt_system_info_impl.h
+include/igc/ocl_igc_interface/impl/igc_features_and_workarounds_impl.cpp
+include/igc/ocl_igc_interface/impl/igc_features_and_workarounds_impl.h
+include/igc/ocl_igc_interface/impl/igc_ocl_device_ctx_impl.cpp
+include/igc/ocl_igc_interface/impl/igc_ocl_device_ctx_impl.h
+include/igc/ocl_igc_interface/impl/igc_ocl_translation_ctx_impl.cpp
+include/igc/ocl_igc_interface/impl/igc_ocl_translation_ctx_impl.h
+include/igc/ocl_igc_interface/impl/ocl_gen_binary_impl.cpp
+include/igc/ocl_igc_interface/impl/ocl_gen_binary_impl.h
+include/igc/ocl_igc_interface/impl/ocl_translation_output_impl.cpp
+include/igc/ocl_igc_interface/impl/ocl_translation_output_impl.h
+include/igc/ocl_igc_interface/impl/platform_impl.cpp
+include/igc/ocl_igc_interface/impl/platform_impl.h
+include/igc/ocl_igc_interface/ocl_gen_binary.h
+include/igc/ocl_igc_interface/ocl_translation_output.h
+include/igc/ocl_igc_interface/platform.h
+include/igc/ocl_igc_interface/platform_helper.h
+include/igc/ocl_igc_shared/device_enqueue/DeviceEnqueueInternalTypes.h
+include/igc/ocl_igc_shared/device_enqueue/device_enqueue_internal_types.h
+include/igc/ocl_igc_shared/executable_format/patch_g10.h
+include/igc/ocl_igc_shared/executable_format/patch_g7.h
+include/igc/ocl_igc_shared/executable_format/patch_g75.h
+include/igc/ocl_igc_shared/executable_format/patch_g8.h
+include/igc/ocl_igc_shared/executable_format/patch_g9.h
+include/igc/ocl_igc_shared/executable_format/patch_list.h
+include/igc/ocl_igc_shared/executable_format/patch_shared.h
+include/igc/ocl_igc_shared/executable_format/program_debug_data.h
+include/igc/ocl_igc_shared/gtpin/gtpin_driver_common.h
+include/igc/ocl_igc_shared/gtpin/gtpin_driver_common_bti.h
+include/igc/ocl_igc_shared/gtpin/gtpin_ocl_interface.h
+include/visa/RelocationInfo.h
+lib/libiga%%ARCH_SUFX%%.so
+lib/libiga%%ARCH_SUFX%%.so.1
+lib/libiga%%ARCH_SUFX%%.so.1.0.1
+lib/libigc.so
+lib/libigc.so.1
+lib/libigc.so.1.0.1
+lib/libigdfcl.so
+lib/libigdfcl.so.1
+lib/libigdfcl.so.1.0.1
+libdata/pkgconfig/igc-opencl.pc

Added: head/devel/opencl-clang/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/opencl-clang/Makefile	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+PORTNAME=	opencl-clang
+DISTVERSIONPREFIX=	v
+DISTVERSION=	9.0.0
+CATEGORIES=	devel
+
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	29a1f0d9e4e2.patch:-p1 # unbreak on non-x86
+PATCHFILES+=	b25df8a90fec.patch:-p1 # don't require Git
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Clang wrapper to compile OpenCL C kernels to SPIR-V modules
+
+LICENSE=	NCSA
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libLLVM-${DISTVERSION:R:R}.so:devel/llvm${DISTVERSION:R:S/.//g} \
+		libLLVMSPIRVLib.so.${DISTVERSION:R:R}:devel/spirv-llvm-translator
+
+USES=		cmake compiler:c++11-lib localbase:ldflags
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+GH_ACCOUNT=	intel
+CMAKE_OFF=	LLVMSPIRV_INCLUDED_IN_LLVM
+CMAKE_ARGS=	-DSPIRV_TRANSLATOR_DIR:PATH="${PREFIX}/lib"
+PLIST_FILES=	include/cclang/common_clang.h \
+		lib/libopencl-clang.so \
+		lib/libopencl-clang.so.${DISTVERSION:R:R}
+
+pre-configure:
+# XXX devel/llvm* only includes DetermineGCCCompatible if OPENMP is enabled
+	@if [ ! -e ${LOCALBASE}/llvm${DISTVERSION:R:S/.//g}/lib/cmake/llvm/DetermineGCCCompatible.cmake ]; then \
+		${MKDIR} ${WRKSRC}/cmake; \
+		${SED} 's/.*DetermineGCCCompatible.*/set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)/' \
+			${LOCALBASE}/llvm${DISTVERSION:R:S/.//g}/lib/cmake/llvm/AddLLVM.cmake \
+			>${WRKSRC}/cmake/AddLLVM.cmake; \
+		${REINPLACE_CMD} $$'1a\\\nlist(APPEND CMAKE_MODULE_PATH $${CMAKE_SOURCE_DIR}/cmake)\n' \
+			${WRKSRC}/CMakeLists.txt; \
+	fi
+
+.include <bsd.port.mk>

Added: head/devel/opencl-clang/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/opencl-clang/distinfo	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,7 @@
+TIMESTAMP = 1569325196
+SHA256 (intel-opencl-clang-v9.0.0_GH0.tar.gz) = f98b9122da4066e96853429a3cff9e6c0bfb0fee14fa2be5a22e43546a5cfd93
+SIZE (intel-opencl-clang-v9.0.0_GH0.tar.gz) = 23345
+SHA256 (29a1f0d9e4e2.patch) = 69fdd7b9b669bdd0ff75da22e8f16b0f872475e7865bb42c1358acf3ca9972a6
+SIZE (29a1f0d9e4e2.patch) = 1211
+SHA256 (b25df8a90fec.patch) = 3a52fc0bf93dc4c7accbba2327f4a70b6e5650841876b6a4224210074a6c9462
+SIZE (b25df8a90fec.patch) = 1336

Added: head/devel/opencl-clang/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/opencl-clang/pkg-descr	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,5 @@
+Common clang is a thin wrapper library around clang. Common clang has
+OpenCL-oriented API and is capable to compile OpenCL C kernels to
+SPIR-V modules.
+
+WWW: https://github.com/intel/opencl-clang

Added: head/devel/spirv-llvm-translator/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/spirv-llvm-translator/Makefile	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,40 @@
+# $FreeBSD$
+
+PORTNAME=	spirv-llvm-translator
+DISTVERSIONPREFIX=	v
+DISTVERSION=	9.0.0-1
+CATEGORIES=	devel
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Bi-directional translation between SPIR-V and LLVM IR
+
+LICENSE=	NCSA
+LICENSE_FILE=	${WRKSRC}/LICENSE.TXT
+
+LIB_DEPENDS=	libLLVM-${DISTVERSION:R:R}.so:devel/llvm${DISTVERSION:R:S/.//g}
+
+USES=		cmake compiler:c++11-lib
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+GH_ACCOUNT=	KhronosGroup
+GH_PROJECT=	SPIRV-LLVM-Translator
+CMAKE_ON=	BUILD_SHARED_LIBS
+PLIST_FILES=	include/LLVMSPIRVLib/LLVMSPIRVExtensions.inc \
+		include/LLVMSPIRVLib/LLVMSPIRVLib.h \
+		include/LLVMSPIRVLib/LLVMSPIRVOpts.h \
+		lib/libLLVMSPIRVLib.so \
+		lib/libLLVMSPIRVLib.so.${DISTVERSION:R:R} \
+		libdata/pkgconfig/LLVMSPIRVLib.pc
+
+pre-configure:
+# XXX devel/llvm* only includes DetermineGCCCompatible if OPENMP is enabled
+	@if [ ! -e ${LOCALBASE}/llvm${DISTVERSION:R:S/.//g}/lib/cmake/llvm/DetermineGCCCompatible.cmake ]; then \
+		${MKDIR} ${WRKSRC}/cmake; \
+		${SED} 's/.*DetermineGCCCompatible.*/set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)/' \
+			${LOCALBASE}/llvm${DISTVERSION:R:S/.//g}/lib/cmake/llvm/AddLLVM.cmake \
+			>${WRKSRC}/cmake/AddLLVM.cmake; \
+		${REINPLACE_CMD} $$'1a\\\nlist(APPEND CMAKE_MODULE_PATH $${CMAKE_SOURCE_DIR}/cmake)\n' \
+			${WRKSRC}/CMakeLists.txt; \
+	fi
+
+.include <bsd.port.mk>

Added: head/devel/spirv-llvm-translator/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/spirv-llvm-translator/distinfo	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1569304865
+SHA256 (KhronosGroup-SPIRV-LLVM-Translator-v9.0.0-1_GH0.tar.gz) = 19eff5daedb2c1aac8ab8d64a9f8228976dbaad71b1c1a3d3cd4c17cccdb0e55
+SIZE (KhronosGroup-SPIRV-LLVM-Translator-v9.0.0-1_GH0.tar.gz) = 491089

Added: head/devel/spirv-llvm-translator/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/spirv-llvm-translator/pkg-descr	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,4 @@
+LLVM/SPIR-V Bi-Directional Translator is a library and tool for
+translation between LLVM IR and SPIR-V.
+
+WWW: https://github.com/KhronosGroup/SPIRV-LLVM-Translator

Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile	Sat Dec  7 17:24:52 2019	(r519221)
+++ head/lang/Makefile	Sat Dec  7 17:31:44 2019	(r519222)
@@ -45,6 +45,7 @@
     SUBDIR += cmucl-extra
     SUBDIR += cocor
     SUBDIR += coffeescript
+    SUBDIR += compute-runtime
     SUBDIR += cparser
     SUBDIR += crystal
     SUBDIR += csharp-mode.el

Added: head/lang/compute-runtime/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/compute-runtime/Makefile	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,48 @@
+# $FreeBSD$
+
+PORTNAME=	compute-runtime
+DISTVERSION=	19.48.14977
+CATEGORIES=	lang
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	OpenCL library for Intel HD 5000 (Gen8) or newer
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+ONLY_FOR_ARCHS=	amd64 i386
+ONLY_FOR_ARCHS_REASON=	Only Intel GPUs on x86 are supported
+
+LIB_DEPENDS=	libigc.so:devel/intel-graphics-compiler \
+		libigdgmm.so:multimedia/gmmlib
+
+USES=		cmake:noninja compiler:c++14-lang pkgconfig
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+GH_ACCOUNT=	intel
+CMAKE_ARGS=	-DNEO_DRIVER_VERSION:STRING="${DISTVERSIONFULL}"
+PLIST_FILES=	etc/OpenCL/vendors/intel.icd \
+		bin/ocloc \
+		lib/intel-opencl/libigdrcl.so
+
+OPTIONS_DEFINE=	TEST
+
+# XXX Unbundle googletest
+TEST_CMAKE_BOOL_OFF=	SKIP_ALL_ULT
+TEST_BROKEN=		many tests fail
+
+post-patch:
+	@${REINPLACE_CMD} -e '/-Werror/d' \
+		${WRKSRC}/CMakeLists.txt
+	@${REINPLACE_CMD} -e '/defaults/!s,/etc",${PREFIX}&,' \
+		${WRKSRC}/package.cmake
+# XXX libexecinfo backtraces are incomplete
+	@${REINPLACE_CMD} -e 's/SegFault/DISABLED_&/' \
+		${WRKSRC}/unit_tests/offline_compiler/segfault_test/main.cpp
+
+post-install:
+# install/strip has no effect on install(FILES), so strip manually
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/intel-opencl/*.so
+
+.include <bsd.port.mk>

Added: head/lang/compute-runtime/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/compute-runtime/distinfo	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1575037414
+SHA256 (intel-compute-runtime-19.48.14977_GH0.tar.gz) = 1b3c58260582f1af8934cd23837c9b27326f3968b8a21755dbf7d3feec7ebcd3
+SIZE (intel-compute-runtime-19.48.14977_GH0.tar.gz) = 2633172

Added: head/lang/compute-runtime/files/patch-backtrace
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/compute-runtime/files/patch-backtrace	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,140 @@
+Adjust for backtrace(3) on BSDs
+
+In file included from offline_compiler/utilities/linux/safety_caller_linux.cpp:10:
+offline_compiler/utilities/linux/safety_guard_linux.h:36:25: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
+        backtraceSize = backtrace(addresses, callstackDepth);
+                      ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+core/unit_tests/helpers/memory_management.cpp:113:46: error:
+      implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int'
+      [-Werror,-Wshorten-64-to-32]
+  ...= logTraces ? backtrace(eventAllocation.callstack, AllocationEvent::CallStackSize) : 0;
+     ~             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ld: error: undefined symbol: backtrace
+>>> referenced by safety_caller_linux.cpp
+>>>               CMakeFiles/ocloc.dir/utilities/linux/safety_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*))
+ld: error: undefined symbol: backtrace_symbols
+>>> referenced by safety_caller_linux.cpp
+>>>               CMakeFiles/ocloc.dir/utilities/linux/safety_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*))
+
+ld: error: undefined symbol: backtrace_symbols
+>>> referenced by memory_management.cpp
+>>>               CMakeFiles/elflib_tests.dir/__/__/core/unit_tests/helpers/memory_management.cpp.o:(MemoryManagement::printCallStack(MemoryManagement::AllocationEvent const&))
+
+ld: error: undefined symbol: backtrace
+>>> referenced by memory_management.cpp
+>>>               CMakeFiles/elflib_tests.dir/__/__/core/unit_tests/helpers/memory_management.cpp.o:(void* MemoryManagement::allocate<(MemoryManagement::AllocationEvent::EventType)1, (MemoryManagement::AllocationEvent::EventType)2>(unsigned long))
+>>> referenced by memory_management.cpp
+>>>               CMakeFiles/elflib_tests.dir/__/__/core/unit_tests/helpers/memory_management.cpp.o:(void* MemoryManagement::allocate<(MemoryManagement::AllocationEvent::EventType)3, (MemoryManagement::AllocationEvent::EventType)4>(unsigned long, std::nothrow_t const&))
+>>> referenced by memory_management.cpp
+>>>               CMakeFiles/elflib_tests.dir/__/__/core/unit_tests/helpers/memory_management.cpp.o:(void* MemoryManagement::allocate<(MemoryManagement::AllocationEvent::EventType)5, (MemoryManagement::AllocationEvent::EventType)6>(unsigned long))
+>>> referenced by memory_management.cpp
+>>>               CMakeFiles/elflib_tests.dir/__/__/core/unit_tests/helpers/memory_management.cpp.o:(void* MemoryManagement::allocate<(MemoryManagement::AllocationEvent::EventType)7, (MemoryManagement::AllocationEvent::EventType)8>(unsigned long, std::nothrow_t const&))
+>>> referenced by memory_management.cpp
+>>>               CMakeFiles/elflib_tests.dir/__/__/core/unit_tests/helpers/memory_management.cpp.o:(void MemoryManagement::deallocate<(MemoryManagement::AllocationEvent::EventType)9>(void*))
+>>> referenced by memory_management.cpp
+>>>               CMakeFiles/elflib_tests.dir/__/__/core/unit_tests/helpers/memory_management.cpp.o:(void MemoryManagement::deallocate<(MemoryManagement::AllocationEvent::EventType)10>(void*))
+
+ld: error: undefined symbol: backtrace
+>>> referenced by safety_guard_caller_linux.cpp
+>>>               CMakeFiles/ocloc_segfault_test.dir/linux/safety_guard_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*))
+
+ld: error: undefined symbol: backtrace_symbols
+>>> referenced by safety_guard_caller_linux.cpp
+>>>               CMakeFiles/ocloc_segfault_test.dir/linux/safety_guard_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*))
+
+ld: error: undefined symbol: backtrace
+>>> referenced by safety_caller_linux.cpp
+>>>               CMakeFiles/ocloc_tests.dir/__/__/offline_compiler/utilities/linux/safety_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*))
+ld: error: undefined symbol: backtrace_symbols
+>>> referenced by safety_caller_linux.cpp
+>>>               CMakeFiles/ocloc_tests.dir/__/__/offline_compiler/utilities/linux/safety_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*))
+
+--- offline_compiler/utilities/linux/safety_guard_linux.h.orig	2019-11-22 15:41:47 UTC
++++ offline_compiler/utilities/linux/safety_guard_linux.h
+@@ -33,7 +33,7 @@ class SafetyGuardLinux {
+         char **callstack;
+         int backtraceSize = 0;
+ 
+-        backtraceSize = backtrace(addresses, callstackDepth);
++        backtraceSize = (int)backtrace(addresses, callstackDepth);
+         callstack = backtrace_symbols(addresses, backtraceSize);
+ 
+         for (int i = 0; i < backtraceSize; ++i) {
+--- core/unit_tests/helpers/memory_management.cpp.orig	2019-11-22 15:41:47 UTC
++++ core/unit_tests/helpers/memory_management.cpp
+@@ -110,7 +110,7 @@ static void *allocate(size_t size) {
+         eventAllocation.address = p;
+         eventAllocation.event = typeValid;
+ #if defined(__linux__)
+-        eventAllocation.frames = logTraces ? backtrace(eventAllocation.callstack, AllocationEvent::CallStackSize) : 0;
++        eventAllocation.frames = logTraces ? (int)backtrace(eventAllocation.callstack, AllocationEvent::CallStackSize) : 0;
+ #elif defined(_WIN32)
+         eventAllocation.frames = logTraces ? CaptureStackBackTrace(0, AllocationEvent::CallStackSize, eventAllocation.callstack, NULL) : 0;
+ #else
+@@ -162,7 +162,7 @@ static void *allocate(size_t size, const std::nothrow_
+         eventAllocation.address = p;
+         eventAllocation.size = size;
+ #if defined(__linux__)
+-        eventAllocation.frames = logTraces ? backtrace(eventAllocation.callstack, AllocationEvent::CallStackSize) : 0;
++        eventAllocation.frames = logTraces ? (int)backtrace(eventAllocation.callstack, AllocationEvent::CallStackSize) : 0;
+ #elif defined(_WIN32)
+         eventAllocation.frames = logTraces ? CaptureStackBackTrace(0, AllocationEvent::CallStackSize, eventAllocation.callstack, NULL) : 0;
+ #else
+@@ -207,7 +207,7 @@ static void deallocate(void *p) {
+             eventDeallocation.address = p;
+             eventDeallocation.size = -1;
+ #if defined(__linux__)
+-            eventDeallocation.frames = logTraces ? backtrace(eventDeallocation.callstack, AllocationEvent::CallStackSize) : 0;
++            eventDeallocation.frames = logTraces ? (int)backtrace(eventDeallocation.callstack, AllocationEvent::CallStackSize) : 0;
+ #elif defined(_WIN32)
+             eventDeallocation.frames = logTraces ? CaptureStackBackTrace(0, AllocationEvent::CallStackSize, eventDeallocation.callstack, NULL) : 0;
+ #else
+--- offline_compiler/CMakeLists.txt.orig	2019-11-29 14:23:34 UTC
++++ offline_compiler/CMakeLists.txt
+@@ -124,6 +124,9 @@ endif()
+ 
+ if(UNIX)
+   target_link_libraries(ocloc dl pthread)
++  if(CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
++    target_link_libraries(ocloc execinfo)
++  endif()
+ endif()
+ 
+ target_link_libraries(ocloc elflib)
+--- unit_tests/elflib/CMakeLists.txt.orig	2019-11-29 14:23:34 UTC
++++ unit_tests/elflib/CMakeLists.txt
+@@ -21,6 +21,9 @@ set_property(TARGET elflib_tests APPEND_STRING PROPERT
+ 
+ if(UNIX)
+   target_link_libraries(elflib_tests ${IGDRCL_EXTRA_LIBS})
++  if(CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
++    target_link_libraries(elflib_tests execinfo)
++  endif()
+ endif()
+ 
+ add_custom_target(run_elflib_tests ALL DEPENDS unit_tests elflib_tests)
+--- unit_tests/offline_compiler/segfault_test/CMakeLists.txt.orig	2019-11-29 14:23:34 UTC
++++ unit_tests/offline_compiler/segfault_test/CMakeLists.txt
+@@ -39,6 +39,9 @@ if(MSVC)
+ endif()
+ if(UNIX)
+   target_link_libraries(ocloc_segfault_test dl pthread)
++  if(CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
++    target_link_libraries(ocloc_segfault_test execinfo)
++  endif()
+ endif()
+ 
+ set(CLOC_SEGFAULT_TEST_INCLUDES
+--- unit_tests/offline_compiler/CMakeLists.txt.orig	2019-11-29 14:23:34 UTC
++++ unit_tests/offline_compiler/CMakeLists.txt
+@@ -86,6 +86,9 @@ endif()
+ 
+ if(UNIX)
+   target_link_libraries(ocloc_tests dl pthread)
++  if(CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
++    target_link_libraries(ocloc_tests execinfo)
++  endif()
+ endif()
+ 
+ get_property(CLOC_FOLDER TARGET ocloc PROPERTY FOLDER)

Added: head/lang/compute-runtime/files/patch-clang9
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/compute-runtime/files/patch-clang9	Sat Dec  7 17:31:44 2019	(r519222)
@@ -0,0 +1,76 @@
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at preamble_gen9.cpp
+>>>            preamble_gen9.cpp.o:(.rodata+0x0) in archive ../lib/libigdrcl_lib_release.a
+
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at preamble_gen9.cpp
+>>>            preamble_gen9.cpp.o:(.rodata+0x4) in archive ../lib/libigdrcl_lib_release.a
+
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at command_stream_receiver_hw_gen11.cpp
+>>>            command_stream_receiver_hw_gen11.cpp.o:(.rodata+0x0) in archive ../lib/libigdrcl_lib_release.a
+
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at command_stream_receiver_hw_gen11.cpp
+>>>            command_stream_receiver_hw_gen11.cpp.o:(.rodata+0x4) in archive ../lib/libigdrcl_lib_release.a
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at preamble_gen11.cpp
+>>>            preamble_gen11.cpp.o:(.rodata+0x0) in archive ../lib/libigdrcl_lib_release.a
+
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at preamble_gen11.cpp
+>>>            preamble_gen11.cpp.o:(.rodata+0x4) in archive ../lib/libigdrcl_lib_release.a
+
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at aub_mem_dump_gen12lp.cpp
+>>>            aub_mem_dump_gen12lp.cpp.o:(.rodata+0x0) in archive ../lib/libigdrcl_lib_release.a
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at aub_mem_dump_gen12lp.cpp
+>>>            aub_mem_dump_gen12lp.cpp.o:(.rodata+0x4) in archive ../lib/libigdrcl_lib_release.a
+
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::registerOffset<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at preamble_gen12lp.cpp
+>>>            preamble_gen12lp.cpp.o:(.rodata+0x0) in archive ../lib/libigdrcl_lib_release.a
+
+ld: error: duplicate symbol: NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>
+>>> defined at preamble_gen8.cpp
+>>>            preamble_gen8.cpp.o:(NEO::DebugModeRegisterOffset::debugEnabledValue<NEO::ICLFamily>) in archive ../lib/libigdrcl_lib_release.a
+>>> defined at preamble_gen12lp.cpp
+>>>            preamble_gen12lp.cpp.o:(.rodata+0x4) in archive ../lib/libigdrcl_lib_release.a
+
+--- runtime/gen11/reg_configs.h.orig	2019-11-29 14:23:34 UTC
++++ runtime/gen11/reg_configs.h
+@@ -25,9 +25,15 @@ struct L3CNTLRegisterOffset<ICLFamily> {
+ 
+ namespace DebugModeRegisterOffset {
+ template <>
++#ifdef __clang__
++static
++#endif
+ constexpr uint32_t registerOffset<ICLFamily> = 0x20d8;
+ template <>
++#ifdef __clang__
++static
++#endif
+ constexpr uint32_t debugEnabledValue<ICLFamily> = (1 << 5) | (1 << 21);
+ }; // namespace DebugModeRegisterOffset
+ 
+ namespace gen11HdcModeRegister {

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912071731.xB7HVifm025376>