From 2914c71cc8abd253db712fb2c55a5c777e6925ed Mon Sep 17 00:00:00 2001 From: Yogesh Tyagi Date: Wed, 27 Jul 2022 15:27:33 +0800 Subject: ispc : upgrade 1.17.0 -> 1.18.0 * Don't build with clang specifically and let user decide. * Drop already merged patch: 0001-Enable-LLVM-15.0-support.patch * ispc generated headers include a comment will full path to the header. Patch the code to drop this comment. * Tweak bison and flex invocation to make sure they don't include #line directives. * Add flex-native to DEPENDS. * Release notes: https://github.com/ispc/ispc/releases/tag/v1.18.0 Signed-off-by: Yogesh Tyagi Signed-off-by: Anuj Mittal --- .../ispc/ispc/0001-Enable-LLVM-15.0-support.patch | 52 ---------------------- .../ispc/ispc/0001-Fix-QA-Issues.patch | 37 +++++++++++++++ .../clang-layer/recipes-core/ispc/ispc_1.17.0.bb | 41 ----------------- .../clang-layer/recipes-core/ispc/ispc_1.18.0.bb | 47 +++++++++++++++++++ 4 files changed, 84 insertions(+), 93 deletions(-) delete mode 100644 dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Enable-LLVM-15.0-support.patch create mode 100644 dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch delete mode 100644 dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb create mode 100644 dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Enable-LLVM-15.0-support.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Enable-LLVM-15.0-support.patch deleted file mode 100644 index fe82ff25..00000000 --- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Enable-LLVM-15.0-support.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 9b722217a2818bc4335bf2c7d3293d30aa5977b1 Mon Sep 17 00:00:00 2001 -From: Dmitry Babokin -Date: Fri, 4 Feb 2022 16:45:34 -0800 -Subject: [PATCH 01/24] Enable LLVM 15.0 support - -Upstream-Status: Backport [https://github.com/ispc/ispc/commit/9b722217a2818bc4335bf2c7d3293d30aa5977b1] - -Signed-off-by: Dmitry Babokin ---- - src/ispc.h | 4 ++-- - src/ispc_version.h | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/ispc.h b/src/ispc.h -index 362c2b93..581d5de6 100644 ---- a/src/ispc.h -+++ b/src/ispc.h -@@ -1,5 +1,5 @@ - /* -- Copyright (c) 2010-2021, Intel Corporation -+ Copyright (c) 2010-2022, Intel Corporation - All rights reserved. - - Redistribution and use in source and binary forms, with or without -@@ -42,7 +42,7 @@ - #include "target_registry.h" - - #if ISPC_LLVM_VERSION < OLDEST_SUPPORTED_LLVM || ISPC_LLVM_VERSION > LATEST_SUPPORTED_LLVM --#error "Only LLVM 11.0 - 13.0 and 14.0 development branch are supported" -+#error "Only LLVM 11.0 - 14.0 and 15.0 development branch are supported" - #endif - - #if defined(_WIN32) || defined(_WIN64) -diff --git a/src/ispc_version.h b/src/ispc_version.h -index e8487e5b..04a3cf64 100644 ---- a/src/ispc_version.h -+++ b/src/ispc_version.h -@@ -50,9 +50,10 @@ - #define ISPC_LLVM_12_0 120000 - #define ISPC_LLVM_13_0 130000 - #define ISPC_LLVM_14_0 140000 -+#define ISPC_LLVM_15_0 150000 - - #define OLDEST_SUPPORTED_LLVM ISPC_LLVM_10_0 --#define LATEST_SUPPORTED_LLVM ISPC_LLVM_14_0 -+#define LATEST_SUPPORTED_LLVM ISPC_LLVM_15_0 - - #ifdef __ispc__xstr - #undef __ispc__xstr --- -2.17.1 - diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch new file mode 100644 index 00000000..e7bb599e --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch @@ -0,0 +1,37 @@ +From 139b94a7fb72114c31a2a6ab3f7e6024b4a738ec Mon Sep 17 00:00:00 2001 +From: Yogesh Tyagi +Date: Tue, 26 Jul 2022 15:25:10 +0800 +Subject: [PATCH] Fix QA Issues + +Stop ispc from inserting host file path in generated headers which leads to reproducibility problems. + +Upstream-Status: Inappropriate [OE build specific] + +Signed-off-by: Yogesh Tyagi + +--- + src/module.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/module.cpp b/src/module.cpp +index 58a2ae83..82673052 100644 +--- a/src/module.cpp ++++ b/src/module.cpp +@@ -2105,7 +2105,7 @@ bool Module::writeHeader(const char *fn) { + perror("fopen"); + return false; + } +- fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", fn); ++ fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n"); + fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n"); + + // Create a nice guard string from the filename, turning any +@@ -2219,7 +2219,7 @@ bool Module::writeDispatchHeader(DispatchHeaderInfo *DHI) { + FILE *f = DHI->file; + + if (DHI->EmitFrontMatter) { +- fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", DHI->fn); ++ fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n"); + fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n"); + } + // Create a nice guard string from the filename, turning any diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb deleted file mode 100644 index cfd8e5bc..00000000 --- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -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 python3native - -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://0002-cmake-don-t-build-for-32-bit-targets.patch \ - file://0001-Enable-LLVM-15.0-support.patch \ - " -SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a" - -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 \ - -DARM_ENABLED=OFF \ - -DISPC_CROSS=ON \ - -DISPC_ANDROID_TARGET=OFF \ - -DISPC_FREEBSD_TARGET=OFF \ - -DISPC_WINDOWS_TARGET=OFF \ - -DISPC_IOS_TARGET=OFF \ - -DISPC_PS4_TARGET=OFF \ - -DSYSROOT_DIR=${STAGING_DIR_NATIVE} \ - " - -TOOLCHAIN = "clang" -BBCLASSEXTEND = "native nativesdk" diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb new file mode 100644 index 00000000..db674178 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb @@ -0,0 +1,47 @@ +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 python3native + +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://0002-cmake-don-t-build-for-32-bit-targets.patch \ + file://0001-Fix-QA-Issues.patch \ + " +SRCREV = "f7ec3aa173c816377c215d83196b5c7c3a88db1c" + +COMPATIBLE_HOST = '(x86_64).*-linux' + +DEPENDS += " clang-native bison-native flex-native" +RDEPENDS:${PN} += " clang-libllvm clang" + +YFLAGS='-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' + +do_configure:prepend() { + sed -i -e 's#\${BISON_EXECUTABLE}.*#\${BISON_EXECUTABLE} ${YFLAGS} #g' ${S}/CMakeLists.txt + sed -i -e 's#\${FLEX_EXECUTABLE}.*#\${FLEX_EXECUTABLE} \-L #g' ${S}/CMakeLists.txt +} + +EXTRA_OECMAKE += " \ + -DISPC_INCLUDE_TESTS=OFF \ + -DISPC_INCLUDE_EXAMPLES=OFF \ + -DISPC_NO_DUMPS=ON \ + -DARM_ENABLED=OFF \ + -DISPC_CROSS=ON \ + -DISPC_ANDROID_TARGET=OFF \ + -DISPC_FREEBSD_TARGET=OFF \ + -DISPC_WINDOWS_TARGET=OFF \ + -DISPC_IOS_TARGET=OFF \ + -DISPC_PS4_TARGET=OFF \ + -DSYSROOT_DIR=${STAGING_DIR_NATIVE} \ + " + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf