[PATCH v1 4/4] [DON'T COMMIT] error if TC_AARCH64 is not defined on AArch64 target
Matthieu Longo
matthieu.longo@arm.com
Wed Dec 11 12:05:53 GMT 2024
---
bfd/elf-eh-frame.c | 2 ++
binutils/dwarf.c | 2 ++
gas/dw2gencfi.c | 4 ++++
gas/gen-sframe.c | 2 ++
include/dwarf2.def | 2 ++
5 files changed, 12 insertions(+)
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 8453c3dcf81..ed25a505af4 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -361,6 +361,8 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
#if TC_AARCH64
case DW_CFA_AARCH64_negate_ra_state:
case DW_CFA_AARCH64_negate_ra_state_with_pc:
+#else
+#pragma GCC error "TC_AARCH64 is undefined"
#endif /* TC_AARCH64 */
#if TC_SPARC
case DW_CFA_GNU_window_save:
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index b5e6d2e50d1..65890f964db 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -10362,6 +10362,8 @@ display_debug_frames (struct dwarf_section *section,
if (! do_debug_frames_interp)
printf (" DW_CFA_AARCH64_negate_ra_state_with_pc\n");
break;
+#else
+#pragma GCC error "TC_AARCH64 is undefined"
#endif /* TC_AARCH64 */
#if TC_SPARC
diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c
index 22263da808a..cc00a3e4450 100644
--- a/gas/dw2gencfi.c
+++ b/gas/dw2gencfi.c
@@ -720,6 +720,8 @@ const pseudo_typeS cfi_pseudo_table[] =
{ "cfi_window_save", dot_cfi, DW_CFA_GNU_window_save },
{ "cfi_negate_ra_state", dot_cfi, DW_CFA_AARCH64_negate_ra_state },
{ "cfi_negate_ra_state_with_pc", dot_cfi, DW_CFA_AARCH64_negate_ra_state_with_pc },
+#else
+#pragma GCC error "TC_AARCH64 is undefined"
#endif /* TC_AARCH64 */
#if TC_SPARC
{ "cfi_window_save", dot_cfi, DW_CFA_GNU_window_save },
@@ -928,6 +930,8 @@ dot_cfi (int arg)
case DW_CFA_AARCH64_negate_ra_state_with_pc:
cfi_add_CFA_insn (DW_CFA_AARCH64_negate_ra_state_with_pc);
break;
+#else
+#pragma GCC error "TC_AARCH64 is undefined"
#endif /* TC_AARCH64 */
#if TC_SPARC
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index 12c92774a7d..ef3d1285af0 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -1297,6 +1297,8 @@ sframe_xlate_do_aarch64_negate_ra_state_with_pc (struct sframe_xlate_ctx *xlate_
return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */
}
+#else
+#pragma GCC error "TC_AARCH64 is undefined"
#endif /* TC_AARCH64 */
#if TC_SPARC
diff --git a/include/dwarf2.def b/include/dwarf2.def
index 1a38d7e0484..31c4eb9682b 100644
--- a/include/dwarf2.def
+++ b/include/dwarf2.def
@@ -794,6 +794,8 @@ DW_CFA (DW_CFA_AARCH64_negate_ra_state_with_pc, 0x2c)
DW_CFA (DW_CFA_AARCH64_negate_ra_state, 0x2d)
/* NOTE: DW_CFA_GNU_window_save is multiplexed on Sparc and AArch64. */
DW_CFA_DUP (DW_CFA_GNU_window_save, 0x2d)
+#else
+#pragma GCC error "TC_AARCH64 is undefined"
#endif /* TC_AARCH64 */
/* Sparc specific extensions. */
--
2.47.1
More information about the Binutils
mailing list