summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer
diff options
context:
space:
mode:
authorTeoh Suh Haw <suh.haw.teoh@intel.com>2023-06-08 16:00:25 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2023-06-09 13:25:43 +0800
commit3c367f25f6a0c043733b752e084a9c419416b5ad (patch)
tree00e968a12f8c8c2b9f2fe14ef8e75b9f5d8d872a /dynamic-layers/openembedded-layer
parentdbc3ac3084a4259e0f02c8849228bd7fe2fcf9ae (diff)
downloadmeta-intel-3c367f25f6a0c043733b752e084a9c419416b5ad.tar.gz
ispc: upgrade 1.19.0 -> 1.20.0
* Release Notes: https://github.com/ispc/ispc/releases/tag/v1.20.0 * Drop already merged patches: 0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch 0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch ffc75e464ff2b8fce7dbf74f1846ebd0852bc6f9.patch * Fix packaging to ensure libispcrt is packaged correctly. * ISPC runtime with CPU support can either be enabled with OpenMP or TBB. TBB is enabled by default that needs meta-oe to be included. Signed-off-by: Teoh Suh Haw <suh.haw.teoh@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/openembedded-layer')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch56
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch37
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch64
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest2
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.20.0.bb74
5 files changed, 233 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch
new file mode 100644
index 00000000..3ce431d4
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch
@@ -0,0 +1,56 @@
1From 6ba81efe971fb6038af6e950e853d35ee6dd9cc3 Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Sun, 11 Dec 2022 22:34:15 +0800
4Subject: [PATCH] Add print function to print test run status in ptest format
5
6Upstream-Status: Inappropriate [OE ptest specific]
7
8Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
9---
10 run_tests.py | 16 ++++++++++++++++
11 1 file changed, 16 insertions(+)
12
13diff --git a/run_tests.py b/run_tests.py
14index 87305a06..4f2f0f59 100755
15--- a/run_tests.py
16+++ b/run_tests.py
17@@ -385,6 +385,9 @@ def run_test(testname, host, target):
18 else:
19 ispc_exe_rel = add_prefix(host.ispc_cmd, host, target)
20
21+ # to reslove the error '.rodata' can not be used when making a PIE object
22+ ispc_exe_rel = ispc_exe_rel + " --pic"
23+
24 # is this a test to make sure an error is issued?
25 want_error = (filename.find("tests_errors") != -1)
26 if want_error == True:
27@@ -844,6 +847,17 @@ def check_compiler_exists(compiler_exe):
28 return
29 error("missing the required compiler: %s \n" % compiler_exe, 1)
30
31+def print_test_run_status(results):
32+ for fstatus in results:
33+ if (fstatus[1] == Status.Success):
34+ print( "%s: %s" % ("PASS", fstatus[0]))
35+ elif (fstatus[1] == Status.Compfail):
36+ print( "%s: %s" % ("FAIL", fstatus[0]))
37+ elif (fstatus[1] == Status.Runfail):
38+ print( "%s: %s" % ("FAIL", fstatus[0]))
39+ elif (fstatus[1] == Status.Skip):
40+ print( "%s: %s" % ("SKIP", fstatus[0]))
41+
42 def print_result(status, results, s, run_tests_log, csv):
43 title = StatusStr[status]
44 file_list = [fname for fname, fstatus in results if status == fstatus]
45@@ -987,6 +1001,8 @@ def run_tests(options1, args, print_version):
46 pass_rate = -1
47 print_debug("PASSRATE (%d/%d) = %d%% \n\n" % (len(run_succeed_files), total_tests_executed, pass_rate), s, run_tests_log)
48
49+ print_test_run_status(results)
50+
51 for status in Status:
52 print_result(status, results, s, run_tests_log, options.csv)
53 fails = [status != Status.Compfail and status != Status.Runfail for _, status in results]
54--
552.37.3
56
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch
new file mode 100644
index 00000000..e7bb599e
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch
@@ -0,0 +1,37 @@
1From 139b94a7fb72114c31a2a6ab3f7e6024b4a738ec Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Tue, 26 Jul 2022 15:25:10 +0800
4Subject: [PATCH] Fix QA Issues
5
6Stop ispc from inserting host file path in generated headers which leads to reproducibility problems.
7
8Upstream-Status: Inappropriate [OE build specific]
9
10Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
11
12---
13 src/module.cpp | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/src/module.cpp b/src/module.cpp
17index 58a2ae83..82673052 100644
18--- a/src/module.cpp
19+++ b/src/module.cpp
20@@ -2105,7 +2105,7 @@ bool Module::writeHeader(const char *fn) {
21 perror("fopen");
22 return false;
23 }
24- fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", fn);
25+ fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n");
26 fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n");
27
28 // Create a nice guard string from the filename, turning any
29@@ -2219,7 +2219,7 @@ bool Module::writeDispatchHeader(DispatchHeaderInfo *DHI) {
30 FILE *f = DHI->file;
31
32 if (DHI->EmitFrontMatter) {
33- fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", DHI->fn);
34+ fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n");
35 fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n");
36 }
37 // Create a nice guard string from the filename, turning any
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch
new file mode 100644
index 00000000..a13ade9f
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch
@@ -0,0 +1,64 @@
1From 493e886d6dae2ed7bdc12ed03f717ee0e98dfe09 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Thu, 24 Feb 2022 20:01:11 +0530
4Subject: [PATCH] cmake: don't build for 32-bit targets
5
6Error log:
7| tmp/work/corei7-64-poky-linux/ispc/1.16.0-r0/recipe-sysroot/usr/include/bits/long-double.h:23:10: fatal error: 'bits/long-double-32.h' file not found
8| #include <bits/long-double-32.h>
9| ^~~~~~~~~~~~~~~~~~~~~~~
10| 1 error generated.
11
12Remove SYSTEM include search path and set -isysroot dir path
13for root dir for cross compilation.
14
15Upstream-Status: Inappropriate
16
17Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
18---
19 cmake/GenerateBuiltins.cmake | 8 ++++----
20 1 file changed, 4 insertions(+), 4 deletions(-)
21
22diff --git a/cmake/GenerateBuiltins.cmake b/cmake/GenerateBuiltins.cmake
23index fa228247..7adc7e52 100644
24--- a/cmake/GenerateBuiltins.cmake
25+++ b/cmake/GenerateBuiltins.cmake
26@@ -272,7 +272,7 @@ function(builtin_to_cpp bit os_name arch supported_archs supported_oses resultFi
27 # In this case headers will be installed in /usr/arm-linux-gnueabihf/include and will not be picked up
28 # by clang by default. So the following line adds such path explicitly. If this path doesn't exist and
29 # the headers can be found in other locations, this should not be a problem.
30- set(includePath -isystem/usr/${debian_triple}/include)
31+ set(includePath -isysroot${SYSROOT_DIR})
32 endif()
33 endif()
34
35@@ -354,7 +354,7 @@ function (generate_target_builtins resultList)
36 set(regular_targets ${ARGN})
37 list(FILTER regular_targets EXCLUDE REGEX wasm)
38 foreach (ispc_target ${regular_targets})
39- foreach (bit 32 64)
40+ foreach (bit 64)
41 foreach (os_name ${TARGET_OS_LIST_FOR_LL})
42 target_ll_to_cpp(target-${ispc_target} ${bit} ${os_name} output${os_name}${bit})
43 list(APPEND tmpList ${output${os_name}${bit}})
44@@ -415,7 +415,7 @@ function (generate_common_builtins resultList)
45 endif()
46
47 message (STATUS "ISPC will be built with support of ${supported_oses} for ${supported_archs}")
48- foreach (bit 32 64)
49+ foreach (bit 64)
50 foreach (os_name "windows" "linux" "freebsd" "macos" "android" "ios" "ps4" "web")
51 foreach (arch "x86" "arm" "wasm32")
52 builtin_to_cpp(${bit} ${os_name} ${arch} "${supported_archs}" "${supported_oses}" res${bit}${os_name}${arch})
53@@ -428,7 +428,7 @@ function (generate_common_builtins resultList)
54 endforeach()
55 endforeach()
56 if (XE_ENABLED)
57- foreach (bit 32 64)
58+ foreach (bit 64)
59 builtin_xe_to_cpp(${bit} res_xe_${bit})
60 list(APPEND tmpList ${res_xe_${bit}} )
61 if(MSVC)
62--
632.17.1
64
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest
new file mode 100644
index 00000000..77d13bb4
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2python3 run_tests.py
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.20.0.bb b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.20.0.bb
new file mode 100644
index 00000000..4e607004
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.20.0.bb
@@ -0,0 +1,74 @@
1SUMMARY = "Intel(R) Implicit SPMD Program Compiler"
2DESCRIPTION = "ispc is a compiler for a variant of the C programming language, \
3with extensions for single program, multiple data programming."
4HOMEPAGE = "https://github.com/ispc/ispc"
5
6LICENSE = "BSD-3-Clause & Apache-2.0-with-LLVM-exception"
7LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=da5ecffdd210b3cf776b32b41c182e87 \
8 file://third-party-programs.txt;md5=2061218c7be521556719c8b504bf9ddd"
9
10inherit cmake python3native ptest
11
12S = "${WORKDIR}/git"
13
14SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \
15 file://0002-cmake-don-t-build-for-32-bit-targets.patch \
16 file://0001-Fix-QA-Issues.patch \
17 file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \
18 file://run-ptest \
19 "
20
21SRCREV = "14bd04aa7e68cd33eb1d96b33058cb64d7ef76f4"
22
23COMPATIBLE_HOST = '(x86_64).*-linux'
24
25DEPENDS += " clang-native bison-native flex-native"
26DEPENDS:append:class-target = " clang"
27RDEPENDS:${PN}-ptest += " python3-multiprocessing"
28
29PACKAGECONFIG ??= "tbb"
30PACKAGECONFIG[tbb] = "-DISPCRT_BUILD_TASK_MODEL=TBB, -DISPCRT_BUILD_TASK_MODEL=OpenMP, tbb"
31
32YFLAGS='-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}'
33
34do_configure:prepend() {
35 sed -i -e 's#\${BISON_EXECUTABLE}.*#\${BISON_EXECUTABLE} ${YFLAGS} #g' ${S}/CMakeLists.txt
36 sed -i -e 's#\${FLEX_EXECUTABLE}.*#\${FLEX_EXECUTABLE} \-L #g' ${S}/CMakeLists.txt
37}
38
39do_install_ptest() {
40 cp -rf ${S}/run_tests.py ${D}${PTEST_PATH}
41 cp -rf ${S}/common.py ${D}${PTEST_PATH}
42 cp -rf ${S}/tests ${D}${PTEST_PATH}
43 cp -rf ${S}/test_static.isph ${D}${PTEST_PATH}
44 cp -rf ${S}/fail_db.txt ${D}${PTEST_PATH}
45 cp -rf ${S}/test_static.cpp ${D}${PTEST_PATH}
46}
47
48EXTRA_OECMAKE += " \
49 -DISPC_INCLUDE_TESTS=OFF \
50 -DISPC_INCLUDE_EXAMPLES=OFF \
51 -DISPC_NO_DUMPS=ON \
52 -DARM_ENABLED=OFF \
53 -DISPC_CROSS=ON \
54 -DISPC_ANDROID_TARGET=OFF \
55 -DISPC_FREEBSD_TARGET=OFF \
56 -DISPC_WINDOWS_TARGET=OFF \
57 -DISPC_IOS_TARGET=OFF \
58 -DISPC_PS4_TARGET=OFF \
59 -DSYSROOT_DIR=${STAGING_DIR} \
60 -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \
61 -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \
62 -DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \
63 -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \
64 "
65
66FILES:${PN}-dev = "\
67 ${libdir}/libispcrt_device_cpu${SOLIBSDEV} \
68 ${libdir}/cmake \
69 ${includedir} \
70 "
71
72FILES:${PN} += "${libdir}/libispcrt.so"
73
74BBCLASSEXTEND = "native nativesdk"