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 <yogesh.tyagi@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
Yogesh Tyagi 2022-07-27 15:27:33 +08:00 committed by Anuj Mittal
parent b783f9e933
commit 2914c71cc8
3 changed files with 47 additions and 56 deletions

View File

@ -1,52 +0,0 @@
From 9b722217a2818bc4335bf2c7d3293d30aa5977b1 Mon Sep 17 00:00:00 2001
From: Dmitry Babokin <dmitry.y.babokin@intel.com>
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 <dmitry.y.babokin@intel.com>
---
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

View File

@ -0,0 +1,37 @@
From 139b94a7fb72114c31a2a6ab3f7e6024b4a738ec Mon Sep 17 00:00:00 2001
From: Yogesh Tyagi <yogesh.tyagi@intel.com>
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 <yogesh.tyagi@intel.com>
---
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

View File

@ -14,15 +14,22 @@ 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 \
file://0001-Fix-QA-Issues.patch \
"
SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a"
SRCREV = "f7ec3aa173c816377c215d83196b5c7c3a88db1c"
COMPATIBLE_HOST = '(x86_64).*-linux'
DEPENDS += " clang-native bison-native "
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 \
@ -37,5 +44,4 @@ EXTRA_OECMAKE += " \
-DSYSROOT_DIR=${STAGING_DIR_NATIVE} \
"
TOOLCHAIN = "clang"
BBCLASSEXTEND = "native nativesdk"