diff options
| author | Naveen Saini <naveen.kumar.saini@intel.com> | 2023-05-12 18:12:08 +0800 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2023-05-15 10:16:01 +0800 |
| commit | edf80dea791c96f90cb0ddcbda3fccca0bf242d4 (patch) | |
| tree | 5f3a68efe512f748640bf654750545b9a0e1587e /dynamic-layers/clang-layer | |
| parent | 2752b2e20f90f8cf901d32cec5ff93b1881c6ded (diff) | |
| download | meta-intel-edf80dea791c96f90cb0ddcbda3fccca0bf242d4.tar.gz | |
ispc: fix recipe
There are few problems in current recipe:
(1)
ispc needs to invoke native llvm-config from target sysroot to list LLVM
lib libraries. clang already provides crossscripts/llvm-config, which does
the job.
However, using LLVM_TOOLS_BINARY_DIR leads to wrong llvm-config being
used. So remove it from search path for llvm-config.
(2)
Error:
ispc/1.19.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-ld:
ispc/1.19.0-r0/recipe-sysroot-native/usr/lib/libclang-cpp.so: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'
error: linker command failed with exit code 1 (use -v to see invocation)
Native libraries were being linked to target libraries leading to this
failure. Fix and cleanup DEPENDS/RDEPENDS.
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer')
| -rw-r--r-- | dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch | 37 | ||||
| -rw-r--r-- | dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.19.0.bb | 10 |
2 files changed, 44 insertions, 3 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch new file mode 100644 index 00000000..79e8e683 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 51d248d3b470f3fa1cf2ed3f5742851091acb65f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Fri, 12 May 2023 09:10:11 +0800 | ||
| 4 | Subject: [PATCH] CMakeLists.txt: allow to pick llvm-config from | ||
| 5 | usr/bin/crossscripts/ | ||
| 6 | |||
| 7 | ispc needs to invoke native llvm-config from target sysroot to list LLVM | ||
| 8 | lib libraries. clang already provides crossscripts/llvm-config, which does | ||
| 9 | the job. | ||
| 10 | |||
| 11 | However, using LLVM_TOOLS_BINARY_DIR leads to wrong llvm-config being | ||
| 12 | used. So remove it from search path for llvm-config. | ||
| 13 | |||
| 14 | Upstream-Status: Inappropriate | ||
| 15 | |||
| 16 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 17 | --- | ||
| 18 | cmake/FindLLVM.cmake | 3 +-- | ||
| 19 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/cmake/FindLLVM.cmake b/cmake/FindLLVM.cmake | ||
| 22 | index d0297d5d..90d9fed2 100644 | ||
| 23 | --- a/cmake/FindLLVM.cmake | ||
| 24 | +++ b/cmake/FindLLVM.cmake | ||
| 25 | @@ -41,8 +41,7 @@ find_package(LLVM REQUIRED CONFIG) | ||
| 26 | set(LLVM_VERSION "LLVM_${LLVM_VERSION_MAJOR}_${LLVM_VERSION_MINOR}") | ||
| 27 | message(STATUS "Found LLVM ${LLVM_VERSION}") | ||
| 28 | |||
| 29 | -find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config | ||
| 30 | - PATHS ${LLVM_TOOLS_BINARY_DIR} PATH_SUFFIXES bin NO_DEFAULT_PATH) | ||
| 31 | +find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config) | ||
| 32 | if (NOT LLVM_CONFIG_EXECUTABLE) | ||
| 33 | message(FATAL_ERROR "Failed to find llvm-config") | ||
| 34 | endif() | ||
| 35 | -- | ||
| 36 | 2.37.3 | ||
| 37 | |||
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.19.0.bb b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.19.0.bb index db4f31b4..a471b154 100644 --- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.19.0.bb +++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.19.0.bb | |||
| @@ -16,6 +16,7 @@ SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \ | |||
| 16 | file://0002-cmake-don-t-build-for-32-bit-targets.patch \ | 16 | file://0002-cmake-don-t-build-for-32-bit-targets.patch \ |
| 17 | file://0001-Fix-QA-Issues.patch \ | 17 | file://0001-Fix-QA-Issues.patch \ |
| 18 | file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \ | 18 | file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \ |
| 19 | file://0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch \ | ||
| 19 | file://run-ptest \ | 20 | file://run-ptest \ |
| 20 | " | 21 | " |
| 21 | 22 | ||
| @@ -24,7 +25,7 @@ SRCREV = "ee43967286215a0511c2bc090e604848b4a32bed" | |||
| 24 | COMPATIBLE_HOST = '(x86_64).*-linux' | 25 | COMPATIBLE_HOST = '(x86_64).*-linux' |
| 25 | 26 | ||
| 26 | DEPENDS += " clang-native bison-native flex-native" | 27 | DEPENDS += " clang-native bison-native flex-native" |
| 27 | RDEPENDS:${PN} += " clang-libllvm clang clang-libclang-cpp" | 28 | DEPENDS:append:class-target = " clang" |
| 28 | RDEPENDS:${PN}-ptest += " python3-multiprocessing" | 29 | RDEPENDS:${PN}-ptest += " python3-multiprocessing" |
| 29 | 30 | ||
| 30 | YFLAGS='-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' | 31 | YFLAGS='-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' |
| @@ -54,7 +55,10 @@ EXTRA_OECMAKE += " \ | |||
| 54 | -DISPC_WINDOWS_TARGET=OFF \ | 55 | -DISPC_WINDOWS_TARGET=OFF \ |
| 55 | -DISPC_IOS_TARGET=OFF \ | 56 | -DISPC_IOS_TARGET=OFF \ |
| 56 | -DISPC_PS4_TARGET=OFF \ | 57 | -DISPC_PS4_TARGET=OFF \ |
| 57 | -DSYSROOT_DIR=${STAGING_DIR_NATIVE} \ | 58 | -DSYSROOT_DIR=${STAGING_DIR} \ |
| 59 | -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \ | ||
| 60 | -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \ | ||
| 61 | -DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \ | ||
| 62 | -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \ | ||
| 58 | " | 63 | " |
| 59 | |||
| 60 | BBCLASSEXTEND = "native nativesdk" | 64 | BBCLASSEXTEND = "native nativesdk" |
