diff options
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/libunwind-guard-unreachable-macro-to-avoid-redefinit.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/libunwind-guard-unreachable-macro-to-avoid-redefinit.patch new file mode 100644 index 0000000000..1e0f15ddf0 --- /dev/null +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/libunwind-guard-unreachable-macro-to-avoid-redefinit.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From e64495a109eefaf87235729f4dd79fc9121c16a6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com> | ||
| 3 | Date: Mon, 27 Oct 2025 19:39:05 +0530 | ||
| 4 | Subject: [PATCH] libunwind: guard unreachable() macro to avoid redefinition | ||
| 5 | with stddef.h | ||
| 6 | |||
| 7 | The build fails due to a macro redefinition conflict for `unreachable()`. | ||
| 8 | GCC 15.2.0 defines `unreachable()` in `stddef.h`, and `libunwind_i.h` also | ||
| 9 | defines it based on the presence of `HAVE__BUILTIN_UNREACHABLE`. This causes | ||
| 10 | a redefinition error when building with `-Werror`. | ||
| 11 | |||
| 12 | Added a guard around the `unreachable()` macro definition in `libunwind_i.h` | ||
| 13 | to ensure it is only defined if not already present. | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | |||
| 17 | Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com> | ||
| 18 | --- | ||
| 19 | external/libunwind/include/libunwind_i.h | 2 ++ | ||
| 20 | 1 file changed, 2 insertions(+) | ||
| 21 | |||
| 22 | diff --git a/external/libunwind/include/libunwind_i.h b/external/libunwind/include/libunwind_i.h | ||
| 23 | index c06912a6..59a462df 100644 | ||
| 24 | --- a/external/libunwind/include/libunwind_i.h | ||
| 25 | +++ b/external/libunwind/include/libunwind_i.h | ||
| 26 | @@ -88,11 +88,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
| 27 | # endif | ||
| 28 | #endif | ||
| 29 | |||
| 30 | +#if !defined(unreachable) | ||
| 31 | #if defined(HAVE__BUILTIN_UNREACHABLE) | ||
| 32 | # define unreachable() __builtin_unreachable() | ||
| 33 | #else | ||
| 34 | # define unreachable() do { } while (1) | ||
| 35 | #endif | ||
| 36 | +#endif | ||
| 37 | |||
| 38 | #ifdef DEBUG | ||
| 39 | # define UNW_DEBUG 1 | ||
| 40 | -- | ||
| 41 | 2.34.1 | ||
| 42 | |||
diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb index 0e25c39bc2..47c8e08b62 100644 --- a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb | |||
| @@ -21,6 +21,7 @@ SRC_URI += " \ | |||
| 21 | file://debian/external/libunwind/user_pt_regs.patch \ | 21 | file://debian/external/libunwind/user_pt_regs.patch \ |
| 22 | file://debian/external/libunwind/legacy_built-in_sync_functions.patch \ | 22 | file://debian/external/libunwind/legacy_built-in_sync_functions.patch \ |
| 23 | file://debian/external/libunwind/20150704-CVE-2015-3239_dwarf_i.h.patch \ | 23 | file://debian/external/libunwind/20150704-CVE-2015-3239_dwarf_i.h.patch \ |
| 24 | file://debian/external/libunwind/libunwind-guard-unreachable-macro-to-avoid-redefinit.patch \ | ||
| 24 | \ | 25 | \ |
| 25 | file://debian/system/core/move-log-file-to-proper-dir.patch \ | 26 | file://debian/system/core/move-log-file-to-proper-dir.patch \ |
| 26 | file://debian/system/core/Added-missing-headers.patch \ | 27 | file://debian/system/core/Added-missing-headers.patch \ |
