From: Naveen Saini <[email protected]> Intel(R) Implicit SPMD Program Compiler (Intel(R) ISPC)
ispc is a compiler for a variant of the C programming language, with extensions for single program, multiple data programming. Under the SPMD model, the programmer writes a program that generally appears to be a regular serial program, though the execution model is actually that a number of program instances execute in parallel on the hardware. https://ispc.github.io/downloads.html https://github.com/ispc/ispc Signed-off-by: Naveen Saini <[email protected]> Signed-off-by: Anuj Mittal <[email protected]> --- ...ink-with-libclang-cpp-library-instea.patch | 28 ++++++++++++++ ...0f26916e776bc3664e6a4dc68eff3a198d7a.patch | 38 +++++++++++++++++++ .../recipes-core/ispc/ispc_1.16.0.bb | 30 +++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch create mode 100644 dynamic-layers/clang-layer/recipes-core/ispc/ispc/8b5d0f26916e776bc3664e6a4dc68eff3a198d7a.patch create mode 100644 dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.16.0.bb diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch new file mode 100644 index 00000000..4e25420c --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch @@ -0,0 +1,28 @@ +From b9bc0df996d1e65fd70d5eb2d40866693f23bb67 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <[email protected]> +Date: Thu, 24 Jun 2021 17:53:27 +0800 +Subject: [PATCH] CMakeLists.txt: link with libclang-cpp library instead + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ef88317e..7507d6a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -281,7 +281,7 @@ if (WASM_ENABLED) + list(APPEND ISPC_TARGETS wasm-i32x4) + endif() + +-set(CLANG_LIBRARY_LIST clangFrontend clangDriver clangSerialization clangParse clangSema clangAnalysis clangAST clangBasic clangEdit clangLex) ++set(CLANG_LIBRARY_LIST clang-cpp) + set(LLVM_COMPONENTS engine ipo bitreader bitwriter instrumentation linker option frontendopenmp) + + if (X86_ENABLED) +-- +2.17.1 + diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/8b5d0f26916e776bc3664e6a4dc68eff3a198d7a.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/8b5d0f26916e776bc3664e6a4dc68eff3a198d7a.patch new file mode 100644 index 00000000..1b87af4c --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/8b5d0f26916e776bc3664e6a4dc68eff3a198d7a.patch @@ -0,0 +1,38 @@ +From 8b5d0f26916e776bc3664e6a4dc68eff3a198d7a Mon Sep 17 00:00:00 2001 +From: Dmitry Babokin <[email protected]> +Date: Wed, 16 Jun 2021 20:38:44 -0700 +Subject: [PATCH] Do not use depricated file open flags + +Upstream-Status: Backport [https://github.com/ispc/ispc/commit/8b5d0f26916e776bc3664e6a4dc68eff3a198d7a] +Signed-off-by: Anuj Mittal <[email protected]> +--- + src/module.cpp | 2 +- + src/opt.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/module.cpp b/src/module.cpp +index 1e68d30c4..352bcd09e 100644 +--- a/src/module.cpp ++++ b/src/module.cpp +@@ -1314,7 +1314,7 @@ bool Module::writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine, llvm: + llvm::CodeGenFileType fileType = (outputType == Object) ? llvm::CGFT_ObjectFile : llvm::CGFT_AssemblyFile; + bool binary = (fileType == llvm::CGFT_ObjectFile); + +- llvm::sys::fs::OpenFlags flags = binary ? llvm::sys::fs::F_None : llvm::sys::fs::F_Text; ++ llvm::sys::fs::OpenFlags flags = binary ? llvm::sys::fs::OF_None : llvm::sys::fs::OF_Text; + + std::error_code error; + +diff --git a/src/opt.cpp b/src/opt.cpp +index ae1a11d3d..de1b27e1e 100644 +--- a/src/opt.cpp ++++ b/src/opt.cpp +@@ -4687,7 +4687,7 @@ void DebugPassFile::run(llvm::Module &module, bool init) { + std::error_code EC; + char fname[100]; + snprintf(fname, sizeof(fname), "%s_%d_%s.ll", init ? "init" : "ir", pnum, sanitize(std::string(pname)).c_str()); +- llvm::raw_fd_ostream OS(fname, EC, llvm::sys::fs::F_None); ++ llvm::raw_fd_ostream OS(fname, EC, llvm::sys::fs::OF_None); + Assert(!EC && "IR dump file creation failed!"); + module.print(OS, 0); + } diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.16.0.bb b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.16.0.bb new file mode 100644 index 00000000..d6f6165d --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.16.0.bb @@ -0,0 +1,30 @@ +SUMMARY = "Intel(R) Implicit SPMD Program Compiler" +DESCRIPTION = "ispc is a compiler for a variant of the C programming language, \ +with extensions for single program, multiple data programming." +HOMEPAGE = "https://github.com/ispc/ispc" + +LICENSE = "BSD-3-Clause & Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=da5ecffdd210b3cf776b32b41c182e87 \ + file://third-party-programs.txt;md5=3cd6f8a7c3bd9d2bb898fcb27c75221a" + +inherit cmake + +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \ + file://0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch \ + file://8b5d0f26916e776bc3664e6a4dc68eff3a198d7a.patch \ + " +SRCREV = "bdd411085d3e398cf7927cb3b94b00af676737ba" + +COMPATIBLE_HOST = '(x86_64).*-linux' + +DEPENDS += " clang-native bison-native " +RDEPENDS_${PN} += " clang-libllvm clang" + +EXTRA_OECMAKE += " \ + -DISPC_INCLUDE_TESTS=OFF \ + -DISPC_INCLUDE_EXAMPLES=OFF \ + -DISPC_NO_DUMPS=ON \ + -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ + " -- 2.32.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#7122): https://lists.yoctoproject.org/g/meta-intel/message/7122 Mute This Topic: https://lists.yoctoproject.org/mt/83779543/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
