diff options
Diffstat (limited to 'meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch')
| -rw-r--r-- | meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch b/meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch new file mode 100644 index 0000000000..d64cba109f --- /dev/null +++ b/meta-oe/recipes-devtools/pahole/files/0001-CMakeList.txt-make-python-optional.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From f6ca8c930d0fbd2491b3cc77169e32806a14e5e9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Matteo Croce <mcroce@microsoft.com> | ||
| 3 | Date: Mon, 30 Aug 2021 16:25:56 +0200 | ||
| 4 | Subject: [PATCH] CMakeList.txt: make python optional | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=88431099950ab3e8bc1645353508d7978a6cad35] | ||
| 7 | |||
| 8 | ostra-cg, which requires python, is installed in the destination dir. | ||
| 9 | Make it optional for embedded distributions which doesn't have the | ||
| 10 | python interpreter available. | ||
| 11 | |||
| 12 | Signed-off-by: Matteo Croce <mcroce@microsoft.com> | ||
| 13 | --- | ||
| 14 | CMakeLists.txt | 7 +++++-- | ||
| 15 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 18 | index 4140574..8523bce 100644 | ||
| 19 | --- a/CMakeLists.txt | ||
| 20 | +++ b/CMakeLists.txt | ||
| 21 | @@ -61,6 +61,7 @@ find_package(DWARF REQUIRED) | ||
| 22 | find_package(ZLIB REQUIRED) | ||
| 23 | find_package(argp REQUIRED) | ||
| 24 | find_package(obstack REQUIRED) | ||
| 25 | +find_package(Python3 QUIET) | ||
| 26 | |||
| 27 | # make sure git submodule(s) are checked out | ||
| 28 | find_package(Git QUIET) | ||
| 29 | @@ -185,8 +186,10 @@ install(FILES dwarves.h dwarves_emit.h dwarves_reorganize.h | ||
| 30 | elfcreator.h elf_symtab.h hash.h libctf.h | ||
| 31 | DESTINATION ${CMAKE_INSTALL_PREFIX}/include/dwarves/) | ||
| 32 | install(FILES man-pages/pahole.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1/) | ||
| 33 | -install(PROGRAMS ostra/ostra-cg DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) | ||
| 34 | +if(Python3_FOUND) | ||
| 35 | + install(PROGRAMS ostra/ostra-cg DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) | ||
| 36 | + install(FILES ostra/python/ostra.py DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dwarves/runtime/python) | ||
| 37 | +endif() | ||
| 38 | install(PROGRAMS btfdiff fullcircle DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) | ||
| 39 | -install(FILES ostra/python/ostra.py DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dwarves/runtime/python) | ||
| 40 | install(FILES lib/Makefile lib/ctracer_relay.c lib/ctracer_relay.h lib/linux.blacklist.cu | ||
| 41 | DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dwarves/runtime) | ||
| 42 | -- | ||
| 43 | 2.31.1 | ||
| 44 | |||
