diff options
author | Niko Mauno <niko.mauno@vaisala.com> | 2024-02-26 11:41:54 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-02-26 08:14:44 -0800 |
commit | 39028d0d9da7aef2dd547f76dd5f9b02b0209c00 (patch) | |
tree | c0733099144d96377011377fc441e40800228e1c /meta-python/recipes-devtools/python/python3-pybind11 | |
parent | fd7555efd4e65830d62ecd97701bf138bc6cf85d (diff) | |
download | meta-openembedded-39028d0d9da7aef2dd547f76dd5f9b02b0209c00.tar.gz |
python3-pybind11: Restore strip prevention patch
The patch which removed the pybind11_strip() call from provisioned
pybind11*Tools.cmake files was dropped in commit
5c455804aede17e0ea0cbb7ab55f8580f912e664 ("python3-pybind11: Upgrade
to 2.10.3").
However this change delegated the requirement to set CMAKE_BUILD_TYPE
as 'Debug' or 'RelWithDebInfo' (or as unset) to the cmake utilizing
packages which have build time dependency on python3-pybind11, failure
to do which causes following kind of BitBake failure with Yocto:
ERROR: foobar-1.0.0-r0 do_package: QA Issue: File '/usr/lib/python3.11/site-packages/foobar.so' from foobar was already stripped, this will prevent future debugging! [already-stripped]
Restore the patch so that the stripping is delegated to Yocto once
more, allowing depending cmake packages to work out of the box also
when they use 'Release' or 'MinSizeRel' as CMAKE_BUILD_TYPE by
default.
Signed-off-by: Joonas Salonpää <joonas.salonpaa@vaisala.com>
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-pybind11')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch b/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch new file mode 100644 index 000000000..37cb78a30 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From debd676cd94f92a30b3be45f1245aa13d8c398c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Balister <philip@balister.org> | ||
3 | Date: Wed, 8 Jul 2020 09:41:43 -0400 | ||
4 | Subject: [PATCH] Do not strip binaries. | ||
5 | |||
6 | * OpenEmbedded strips them after creating debug packages. | ||
7 | |||
8 | Signed-off-by: Philip Balister <philip@balister.org> | ||
9 | Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> | ||
10 | --- | ||
11 | tools/pybind11NewTools.cmake | 7 ------- | ||
12 | tools/pybind11Tools.cmake | 6 ------ | ||
13 | 2 files changed, 13 deletions(-) | ||
14 | |||
15 | diff --git a/tools/pybind11NewTools.cmake b/tools/pybind11NewTools.cmake | ||
16 | index 7d7424a7..accd90c4 100644 | ||
17 | --- a/tools/pybind11NewTools.cmake | ||
18 | +++ b/tools/pybind11NewTools.cmake | ||
19 | @@ -233,13 +233,6 @@ function(pybind11_add_module target_name) | ||
20 | endif() | ||
21 | endif() | ||
22 | |||
23 | - # Use case-insensitive comparison to match the result of $<CONFIG:cfgs> | ||
24 | - string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) | ||
25 | - if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO) | ||
26 | - # Strip unnecessary sections of the binary on Linux/macOS | ||
27 | - pybind11_strip(${target_name}) | ||
28 | - endif() | ||
29 | - | ||
30 | if(MSVC) | ||
31 | target_link_libraries(${target_name} PRIVATE pybind11::windows_extras) | ||
32 | endif() | ||
33 | diff --git a/tools/pybind11Tools.cmake b/tools/pybind11Tools.cmake | ||
34 | index 66ad00a4..855ede41 100644 | ||
35 | --- a/tools/pybind11Tools.cmake | ||
36 | +++ b/tools/pybind11Tools.cmake | ||
37 | @@ -212,12 +212,6 @@ function(pybind11_add_module target_name) | ||
38 | endif() | ||
39 | endif() | ||
40 | |||
41 | - # Use case-insensitive comparison to match the result of $<CONFIG:cfgs> | ||
42 | - string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) | ||
43 | - if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO) | ||
44 | - pybind11_strip(${target_name}) | ||
45 | - endif() | ||
46 | - | ||
47 | if(MSVC) | ||
48 | target_link_libraries(${target_name} PRIVATE pybind11::windows_extras) | ||
49 | endif() | ||
50 | -- | ||
51 | 2.39.2 | ||
52 | |||