From 0ad4a2dfcdd22eb800950d9952e60b05db8c0266 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Fri, 29 Nov 2024 04:38:00 -0800 Subject: [PATCH] overlays/mtk: Add back Cadence-removed macro There is no "predicted branches" extension in any version of the Xtensa ISA reference I have. Newer versions of Cadence tooling have removed (and presumably deprecated) this symbol, but binutils still relies on seeing it (even just to evaluate to a zero to diable the feature). Really the proper fix would be to patch binutils upstream, but let's have compatible headers here first. Signed-off-by: Andy Ross --- .../xtensa_mtk_mt818x_adsp/binutils/include/xtensa-config.h | 4 ++++ overlays/xtensa_mtk_mt818x_adsp/gcc/include/xtensa-config.h | 4 ++++ overlays/xtensa_mtk_mt818x_adsp/gdb/include/xtensa-config.h | 4 ++++ .../xtensa_mtk_mt8196_adsp/binutils/include/xtensa-config.h | 4 ++++ overlays/xtensa_mtk_mt8196_adsp/gcc/include/xtensa-config.h | 4 ++++ overlays/xtensa_mtk_mt8196_adsp/gdb/include/xtensa-config.h | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/overlays/xtensa_mtk_mt818x_adsp/binutils/include/xtensa-config.h b/overlays/xtensa_mtk_mt818x_adsp/binutils/include/xtensa-config.h index 84aeb9ea..06d58bc9 100644 --- a/overlays/xtensa_mtk_mt818x_adsp/binutils/include/xtensa-config.h +++ b/overlays/xtensa_mtk_mt818x_adsp/binutils/include/xtensa-config.h @@ -183,3 +183,7 @@ #endif /* !XTENSA_CONFIG_H */ + +#ifndef XCHAL_HAVE_PREDICTED_BRANCHES +#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* Needed by Zephyr SDK binutils */ +#endif diff --git a/overlays/xtensa_mtk_mt818x_adsp/gcc/include/xtensa-config.h b/overlays/xtensa_mtk_mt818x_adsp/gcc/include/xtensa-config.h index 84aeb9ea..06d58bc9 100644 --- a/overlays/xtensa_mtk_mt818x_adsp/gcc/include/xtensa-config.h +++ b/overlays/xtensa_mtk_mt818x_adsp/gcc/include/xtensa-config.h @@ -183,3 +183,7 @@ #endif /* !XTENSA_CONFIG_H */ + +#ifndef XCHAL_HAVE_PREDICTED_BRANCHES +#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* Needed by Zephyr SDK binutils */ +#endif diff --git a/overlays/xtensa_mtk_mt818x_adsp/gdb/include/xtensa-config.h b/overlays/xtensa_mtk_mt818x_adsp/gdb/include/xtensa-config.h index 84aeb9ea..06d58bc9 100644 --- a/overlays/xtensa_mtk_mt818x_adsp/gdb/include/xtensa-config.h +++ b/overlays/xtensa_mtk_mt818x_adsp/gdb/include/xtensa-config.h @@ -183,3 +183,7 @@ #endif /* !XTENSA_CONFIG_H */ + +#ifndef XCHAL_HAVE_PREDICTED_BRANCHES +#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* Needed by Zephyr SDK binutils */ +#endif diff --git a/overlays/xtensa_mtk_mt8196_adsp/binutils/include/xtensa-config.h b/overlays/xtensa_mtk_mt8196_adsp/binutils/include/xtensa-config.h index 036261de..aa287209 100644 --- a/overlays/xtensa_mtk_mt8196_adsp/binutils/include/xtensa-config.h +++ b/overlays/xtensa_mtk_mt8196_adsp/binutils/include/xtensa-config.h @@ -183,3 +183,7 @@ #endif /* !XTENSA_CONFIG_H */ + +#ifndef XCHAL_HAVE_PREDICTED_BRANCHES +#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* Needed by Zephyr SDK binutils */ +#endif diff --git a/overlays/xtensa_mtk_mt8196_adsp/gcc/include/xtensa-config.h b/overlays/xtensa_mtk_mt8196_adsp/gcc/include/xtensa-config.h index 036261de..aa287209 100644 --- a/overlays/xtensa_mtk_mt8196_adsp/gcc/include/xtensa-config.h +++ b/overlays/xtensa_mtk_mt8196_adsp/gcc/include/xtensa-config.h @@ -183,3 +183,7 @@ #endif /* !XTENSA_CONFIG_H */ + +#ifndef XCHAL_HAVE_PREDICTED_BRANCHES +#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* Needed by Zephyr SDK binutils */ +#endif diff --git a/overlays/xtensa_mtk_mt8196_adsp/gdb/include/xtensa-config.h b/overlays/xtensa_mtk_mt8196_adsp/gdb/include/xtensa-config.h index 036261de..aa287209 100644 --- a/overlays/xtensa_mtk_mt8196_adsp/gdb/include/xtensa-config.h +++ b/overlays/xtensa_mtk_mt8196_adsp/gdb/include/xtensa-config.h @@ -183,3 +183,7 @@ #endif /* !XTENSA_CONFIG_H */ + +#ifndef XCHAL_HAVE_PREDICTED_BRANCHES +#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* Needed by Zephyr SDK binutils */ +#endif