From d9e891f347497411fc4527b4f2dcdb6c5be5db9a Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Sun, 1 Dec 2024 13:44:45 -0800 Subject: [PATCH] overlays/mtk: Add "xtensa_rmap" alias The name of this array changed in upstream bintuils commit 2b16913cdca2 ("gdb: make gdbarch_alloc take ownership of the tdep"). So far, the Zephyr SDK doesn't seem to want to use that version, but add an alias so it builds with upstream crosstools-ng, and commit it here as a reference if we want to port the other Xtensa overlays. Signed-off-by: Andy Ross --- overlays/xtensa_mtk_mt818x_adsp/gdb/gdb/xtensa-config.c | 2 +- overlays/xtensa_mtk_mt8195_adsp/gdb/gdb/xtensa-config.c | 2 ++ overlays/xtensa_mtk_mt8196_adsp/gdb/gdb/xtensa-config.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/overlays/xtensa_mtk_mt818x_adsp/gdb/gdb/xtensa-config.c b/overlays/xtensa_mtk_mt818x_adsp/gdb/gdb/xtensa-config.c index beaf6464..a1b9c8a6 100644 --- a/overlays/xtensa_mtk_mt818x_adsp/gdb/gdb/xtensa-config.c +++ b/overlays/xtensa_mtk_mt818x_adsp/gdb/gdb/xtensa-config.c @@ -555,7 +555,7 @@ xtensa_register_t rmap[] = XTREG_END }; - +extern xtensa_register_t xtensa_rmap[] __attribute__((alias("rmap"))); #ifdef XTENSA_CONFIG_INSTANTIATE XTENSA_CONFIG_INSTANTIATE(rmap,16) diff --git a/overlays/xtensa_mtk_mt8195_adsp/gdb/gdb/xtensa-config.c b/overlays/xtensa_mtk_mt8195_adsp/gdb/gdb/xtensa-config.c index 9d106c9f..bc3e8d88 100644 --- a/overlays/xtensa_mtk_mt8195_adsp/gdb/gdb/xtensa-config.c +++ b/overlays/xtensa_mtk_mt8195_adsp/gdb/gdb/xtensa-config.c @@ -496,4 +496,6 @@ static xtensa_register_t rmap[] = XTREG_END }; +extern xtensa_register_t xtensa_rmap[] __attribute__((alias("rmap"))); + xtensa_gdbarch_tdep xtensa_tdep (rmap); diff --git a/overlays/xtensa_mtk_mt8196_adsp/gdb/gdb/xtensa-config.c b/overlays/xtensa_mtk_mt8196_adsp/gdb/gdb/xtensa-config.c index 464661f2..23c96ee0 100644 --- a/overlays/xtensa_mtk_mt8196_adsp/gdb/gdb/xtensa-config.c +++ b/overlays/xtensa_mtk_mt8196_adsp/gdb/gdb/xtensa-config.c @@ -555,7 +555,7 @@ xtensa_register_t rmap[] = XTREG_END }; - +extern xtensa_register_t xtensa_rmap[] __attribute__((alias("rmap"))); #ifdef XTENSA_CONFIG_INSTANTIATE XTENSA_CONFIG_INSTANTIATE(rmap,16)