From df5a4501181a4e403ed6423cd7c08434e62a3eb0 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Thu, 30 Nov 2023 10:56:05 +0800 Subject: ispc: upgrade 1.21.1 -> 1.22.0 Release notes: https://github.com/ispc/ispc/releases/tag/v1.22.0 Signed-off-by: Naveen Saini Signed-off-by: Anuj Mittal --- .../0001-Fix-return-type-of-lParseOperator.patch | 51 +++++++++++++++++ .../recipes-core/ispc/ispc_1.21.1.bb | 65 --------------------- .../recipes-core/ispc/ispc_1.22.0.bb | 66 ++++++++++++++++++++++ 3 files changed, 117 insertions(+), 65 deletions(-) create mode 100644 dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.21.1.bb create mode 100644 dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.22.0.bb (limited to 'dynamic-layers') diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch new file mode 100644 index 00000000..6ef6cba1 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch @@ -0,0 +1,51 @@ +From 1d1b0f4eacb7d3875d7dd53e2df8dfca2031fa3a Mon Sep 17 00:00:00 2001 +From: Aleksei Nurmukhametov +Date: Tue, 28 Nov 2023 04:11:44 -0800 +Subject: [PATCH] Fix return type of lParseOperator + +When bison is used in -y mode that emulates POSIX Yacc, tokens are +defined as enums (under YYTOKENTYPE ifdef) or as int via macro +definitions. Defining return type as yytokentype causes compile error: +invalid conversion from 'int' to 'yytokentype'. To avoid it, return int +as we do with lParseInteger and lParseFP. + +Upstream-Status: Submitted [https://github.com/ispc/ispc/pull/2709] + +Signed-off-by: Aleksei Nurmukhametov +Signed-off-by: Naveen Saini +--- + src/lex.ll | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lex.ll b/src/lex.ll +index f9e47578..0279831d 100644 +--- a/src/lex.ll ++++ b/src/lex.ll +@@ -20,6 +20,7 @@ using namespace ispc; + static uint64_t lParseBinary(const char *ptr, SourcePos pos, char **endPtr); + static int lParseInteger(bool dotdotdot); + static int lParseFP(); ++static int lParseOperator(const char *ptr); + static void lCComment(SourcePos *); + static void lCppComment(SourcePos *); + static void lNextValidChar(SourcePos *, char const*&); +@@ -29,7 +30,6 @@ static bool lConsumePragma(YYSTYPE *, SourcePos *); + static void lHandleCppHash(SourcePos *); + static void lStringConst(YYSTYPE *, SourcePos *); + static double lParseHexFloat(const char *ptr); +-static yytokentype lParseOperator(const char *ptr); + extern const char *RegisterDependency(const std::string &fileName); + + #define YY_USER_ACTION \ +@@ -1162,7 +1162,7 @@ lParseHexFloat(const char *ptr) { + + /** Parse an operator. + */ +-static yytokentype ++static int + lParseOperator(const char *ptr) { + yylval.stringVal = new std::string(ptr); + if (m->symbolTable->LookupFunctionTemplate(yytext)) +-- +2.37.3 + diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.21.1.bb b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.21.1.bb deleted file mode 100644 index 53e88f6e..00000000 --- a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.21.1.bb +++ /dev/null @@ -1,65 +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=2061218c7be521556719c8b504bf9ddd" - -inherit cmake python3native ptest - -S = "${WORKDIR}/git" - -SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=releases/1.21.x \ - file://0002-cmake-don-t-build-for-32-bit-targets.patch \ - file://0001-Fix-QA-Issues.patch \ - file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \ - file://run-ptest \ - " - -SRCREV = "a0e8e48169f35a129941475c7023920e968dbc31" - -COMPATIBLE_HOST = '(x86_64).*-linux' - -DEPENDS += " clang-native bison-native flex-native" -DEPENDS:append:class-target = " clang" -RDEPENDS:${PN}-ptest += " python3-multiprocessing" - -PACKAGECONFIG ??= "tbb" -PACKAGECONFIG[tbb] = "-DISPCRT_BUILD_TASK_MODEL=TBB, -DISPCRT_BUILD_TASK_MODEL=OpenMP, tbb" - -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 -} - -do_install_ptest() { - cp -rf ${S}/run_tests.py ${D}${PTEST_PATH} - cp -rf ${S}/common.py ${D}${PTEST_PATH} - cp -rf ${S}/tests ${D}${PTEST_PATH} - cp -rf ${S}/test_static.isph ${D}${PTEST_PATH} - cp -rf ${S}/fail_db.txt ${D}${PTEST_PATH} - cp -rf ${S}/test_static.cpp ${D}${PTEST_PATH} -} - -EXTRA_OECMAKE += " \ - -DISPC_INCLUDE_TESTS=OFF \ - -DISPC_INCLUDE_EXAMPLES=OFF \ - -DARM_ENABLED=OFF \ - -DISPC_CROSS=ON \ - -DISPC_ANDROID_TARGET=OFF \ - -DISPC_FREEBSD_TARGET=OFF \ - -DISPC_WINDOWS_TARGET=OFF \ - -DISPC_IOS_TARGET=OFF \ - -DISPC_PS_TARGET=OFF \ - -DSYSROOT_DIR=${STAGING_DIR} \ - -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \ - -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \ - -DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \ - -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \ - " - -BBCLASSEXTEND = "native nativesdk" diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.22.0.bb b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.22.0.bb new file mode 100644 index 00000000..4b434bb0 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.22.0.bb @@ -0,0 +1,66 @@ +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=2061218c7be521556719c8b504bf9ddd" + +inherit cmake python3native ptest + +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \ + file://0002-cmake-don-t-build-for-32-bit-targets.patch \ + file://0001-Fix-QA-Issues.patch \ + file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \ + file://0001-Fix-return-type-of-lParseOperator.patch \ + file://run-ptest \ + " + +SRCREV = "bd2c42d42e0cc3da1baf92160b82d4dc820a02ee" + +COMPATIBLE_HOST = '(x86_64).*-linux' + +DEPENDS += " clang-native bison-native flex-native" +DEPENDS:append:class-target = " clang" +RDEPENDS:${PN}-ptest += " python3-multiprocessing" + +PACKAGECONFIG ??= "tbb" +PACKAGECONFIG[tbb] = "-DISPCRT_BUILD_TASK_MODEL=TBB, -DISPCRT_BUILD_TASK_MODEL=OpenMP, tbb" + +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 +} + +do_install_ptest() { + cp -rf ${S}/run_tests.py ${D}${PTEST_PATH} + cp -rf ${S}/common.py ${D}${PTEST_PATH} + cp -rf ${S}/tests ${D}${PTEST_PATH} + cp -rf ${S}/test_static.isph ${D}${PTEST_PATH} + cp -rf ${S}/fail_db.txt ${D}${PTEST_PATH} + cp -rf ${S}/test_static.cpp ${D}${PTEST_PATH} +} + +EXTRA_OECMAKE += " \ + -DISPC_INCLUDE_TESTS=OFF \ + -DISPC_INCLUDE_EXAMPLES=OFF \ + -DARM_ENABLED=OFF \ + -DISPC_CROSS=ON \ + -DISPC_ANDROID_TARGET=OFF \ + -DISPC_FREEBSD_TARGET=OFF \ + -DISPC_WINDOWS_TARGET=OFF \ + -DISPC_IOS_TARGET=OFF \ + -DISPC_PS_TARGET=OFF \ + -DSYSROOT_DIR=${STAGING_DIR} \ + -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \ + -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \ + -DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \ + -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \ + " + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf