From 3af31d7776f9c21989da4979562c4b92f579bfae Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Wed, 11 Mar 2020 18:01:48 +0200 Subject: bpftrace: recipe cleanup * Remove unneeded dependencies * Remove cross-compilation cmake patch Commit ab68695 was integrated to fix this particular issue, so this patch is not needed anymore. * Remove redundant OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM * Remove extra step for man packaging GNUInstallDirs support was added in the following commit: https://github.com/iovisor/bpftrace/commit/2f38001311e36e7717daa143e09b165bbf915ac6 Signed-off-by: Ovidiu Panait --- ...ild-with-OE-llvm-clang-cross-compiled-pac.patch | 65 ---------------------- recipes-devtools/bpftrace/bpftrace_0.9.4.bb | 12 +--- 2 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 recipes-devtools/bpftrace/bpftrace/0001-Allow-to-build-with-OE-llvm-clang-cross-compiled-pac.patch diff --git a/recipes-devtools/bpftrace/bpftrace/0001-Allow-to-build-with-OE-llvm-clang-cross-compiled-pac.patch b/recipes-devtools/bpftrace/bpftrace/0001-Allow-to-build-with-OE-llvm-clang-cross-compiled-pac.patch deleted file mode 100644 index d6cb322..0000000 --- a/recipes-devtools/bpftrace/bpftrace/0001-Allow-to-build-with-OE-llvm-clang-cross-compiled-pac.patch +++ /dev/null @@ -1,65 +0,0 @@ -From cdfd9284c7e83b1bd18c94c0f39c020f31759178 Mon Sep 17 00:00:00 2001 -From: Sumit Garg -Date: Mon, 17 Feb 2020 09:45:38 +0000 -Subject: [PATCH] Allow to build with OE llvm & clang cross compiled packages - -The default llvm and clang cmake packages requires all libraries, headers -and tools to be present but in case of cross compilation, OE only -provides target specific libraries and headers and requires native llvm -or clang tools. - -So instead of looking for a complete llvm & clang packages, look for -libraries and headers which are installed in target sysroot-recipe path. - -Also, fix name for clang library lookup. - -Signed-off-by: Sumit Garg ---- - CMakeLists.txt | 6 +++--- - src/ast/CMakeLists.txt | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b766669..e4de1e3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -14,7 +14,7 @@ set(STATIC_LIBC OFF CACHE BOOL "Attempt to embed libc, only known to work with m - set(EMBED_LLVM OFF CACHE BOOL "Build LLVM static libs as an ExternalProject and link to these instead of system libs.") - set(EMBED_CLANG OFF CACHE BOOL "Build Clang static libs as an ExternalProject and link to these instead of system libs.") - set(EMBED_LIBCLANG_ONLY OFF CACHE BOOL "Build only libclang.a, and link to system libraries statically") --set(LLVM_VERSION "8" CACHE STRING "Embedded LLVM/Clang version to build and link against.") -+set(LLVM_VERSION "9" CACHE STRING "Embedded LLVM/Clang version to build and link against.") - set(BUILD_ASAN OFF CACHE BOOL "Build bpftrace with -fsanitize=address") - - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -@@ -122,7 +122,7 @@ check_include_file("sys/sdt.h" HAVE_SYSTEMTAP_SYS_SDT_H) - - if (EMBED_LLVM) - include(embed_llvm) --else() -+elseif(0) - # Some users have multiple versions of llvm installed and would like to specify - # a specific llvm version. - if(${LLVM_REQUESTED_VERSION}) -@@ -142,7 +142,7 @@ endif() - - if(EMBED_CLANG) - include(embed_clang) --else() -+elseif(0) - find_package(Clang REQUIRED) - include_directories(SYSTEM ${CLANG_INCLUDE_DIRS}) - endif() -diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt -index f280f47..f8b9dff 100644 ---- a/src/ast/CMakeLists.txt -+++ b/src/ast/CMakeLists.txt -@@ -57,5 +57,5 @@ else() - llvm_expand_dependencies(llvm_libs ${_llvm_libs}) - target_link_libraries(ast ${llvm_libs}) - endif() -- target_link_libraries(ast libclang) -+ target_link_libraries(ast clang) - endif() --- -2.17.1 diff --git a/recipes-devtools/bpftrace/bpftrace_0.9.4.bb b/recipes-devtools/bpftrace/bpftrace_0.9.4.bb index b4955c8..96c7fb2 100644 --- a/recipes-devtools/bpftrace/bpftrace_0.9.4.bb +++ b/recipes-devtools/bpftrace/bpftrace_0.9.4.bb @@ -4,22 +4,16 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" DEPENDS += "bison-native \ - ninja-native \ - elfutils-native \ flex-native \ gtest-native \ git-native \ - ${MLPREFIX}elfutils \ - ${MLPREFIX}binutils \ - ${MLPREFIX}flex \ - clang \ + elfutils \ bcc \ " RDEPENDS_${PN} += "bash python3" SRC_URI = "git://github.com/iovisor/bpftrace \ - file://0001-Allow-to-build-with-OE-llvm-clang-cross-compiled-pac.patch \ " SRCREV = "b1200771b61fd77ed7c5b326e7960d24514dd961" @@ -27,13 +21,9 @@ S = "${WORKDIR}/git" inherit cmake -OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" - EXTRA_OECMAKE = " \ -DCMAKE_BUILD_TYPE=Release \ " -FILES_${PN} += "${prefix}/man/*" - COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*)-linux" COMPATIBLE_HOST_libc-musl = "null" -- cgit v1.2.3-54-g00ecf