aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-linux-tdep.h
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2022-09-09 08:44:50 -0700
committerKeith Seitz <keiths@redhat.com>2022-09-29 10:00:13 -0700
commitac9b8c676e9f52c5238bbc61a2cdd27e3d59db10 (patch)
tree0127ac41cd6400d534b652b5ffda19bf201f6da3 /gdb/s390-linux-tdep.h
parentee8cc2b3f2d121718165b1cab2f537bbf30cae89 (diff)
downloadgdb-ac9b8c676e9f52c5238bbc61a2cdd27e3d59db10.zip
gdb-ac9b8c676e9f52c5238bbc61a2cdd27e3d59db10.tar.gz
gdb-ac9b8c676e9f52c5238bbc61a2cdd27e3d59db10.tar.bz2
Constify target_desc declarations
This patch changes various global target_desc declarations to const, thereby correcting a prominent source of ODR violations in PowerPC-related target code. The majority of files/changes are mechanical const-ifications accomplished by regenerating the C files in features/. This also required manually updating mips-linux-tdep.h, s390-linux-tdep.h, nios2-tdep.h, s390-tdep.h, arch/ppc-linux-tdesc.h, arch/ppc-linux-common.c, and rs6000-tdep.c. Patch tested against the sourceware trybot, and fully regression tested against our (Red Hat's) internal test infrastructure on Rawhide aarch64, s390x, x86_64, and powerpcle. With this patch, I can finally enable LTO in our GDB package builds. [Tested with a rawhide scratch build containing this patch.] Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24835
Diffstat (limited to 'gdb/s390-linux-tdep.h')
-rw-r--r--gdb/s390-linux-tdep.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/s390-linux-tdep.h b/gdb/s390-linux-tdep.h
index acc57ab..a73c20f 100644
--- a/gdb/s390-linux-tdep.h
+++ b/gdb/s390-linux-tdep.h
@@ -48,20 +48,20 @@ extern const struct regset s390_gs_regset;
extern const struct regset s390_gsbc_regset;
/* GNU/Linux target descriptions. */
-extern struct target_desc *tdesc_s390_linux32v1;
-extern struct target_desc *tdesc_s390_linux32v2;
-extern struct target_desc *tdesc_s390_linux64;
-extern struct target_desc *tdesc_s390_linux64v1;
-extern struct target_desc *tdesc_s390_linux64v2;
-extern struct target_desc *tdesc_s390_te_linux64;
-extern struct target_desc *tdesc_s390_vx_linux64;
-extern struct target_desc *tdesc_s390_tevx_linux64;
-extern struct target_desc *tdesc_s390_gs_linux64;
-extern struct target_desc *tdesc_s390x_linux64v1;
-extern struct target_desc *tdesc_s390x_linux64v2;
-extern struct target_desc *tdesc_s390x_te_linux64;
-extern struct target_desc *tdesc_s390x_vx_linux64;
-extern struct target_desc *tdesc_s390x_tevx_linux64;
-extern struct target_desc *tdesc_s390x_gs_linux64;
+extern const struct target_desc *tdesc_s390_linux32v1;
+extern const struct target_desc *tdesc_s390_linux32v2;
+extern const struct target_desc *tdesc_s390_linux64;
+extern const struct target_desc *tdesc_s390_linux64v1;
+extern const struct target_desc *tdesc_s390_linux64v2;
+extern const struct target_desc *tdesc_s390_te_linux64;
+extern const struct target_desc *tdesc_s390_vx_linux64;
+extern const struct target_desc *tdesc_s390_tevx_linux64;
+extern const struct target_desc *tdesc_s390_gs_linux64;
+extern const struct target_desc *tdesc_s390x_linux64v1;
+extern const struct target_desc *tdesc_s390x_linux64v2;
+extern const struct target_desc *tdesc_s390x_te_linux64;
+extern const struct target_desc *tdesc_s390x_vx_linux64;
+extern const struct target_desc *tdesc_s390x_tevx_linux64;
+extern const struct target_desc *tdesc_s390x_gs_linux64;
#endif /* S390_LINUX_TDEP_H */