Constify target_desc declarations
authorKeith Seitz <keiths@redhat.com>
Fri, 9 Sep 2022 15:44:50 +0000 (08:44 -0700)
committerKeith Seitz <keiths@redhat.com>
Thu, 29 Sep 2022 17:00:13 +0000 (10:00 -0700)
commitac9b8c676e9f52c5238bbc61a2cdd27e3d59db10
tree0127ac41cd6400d534b652b5ffda19bf201f6da3
parentee8cc2b3f2d121718165b1cab2f537bbf30cae89
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
78 files changed:
gdb/arch/ppc-linux-common.c
gdb/arch/ppc-linux-tdesc.h
gdb/features/Makefile
gdb/features/microblaze-with-stack-protect.c
gdb/features/microblaze.c
gdb/features/mips-dsp-linux.c
gdb/features/mips-linux.c
gdb/features/mips64-dsp-linux.c
gdb/features/mips64-linux.c
gdb/features/nds32.c
gdb/features/nios2.c
gdb/features/or1k-linux.c
gdb/features/or1k.c
gdb/features/rs6000/powerpc-32.c
gdb/features/rs6000/powerpc-32l.c
gdb/features/rs6000/powerpc-403.c
gdb/features/rs6000/powerpc-403gc.c
gdb/features/rs6000/powerpc-405.c
gdb/features/rs6000/powerpc-505.c
gdb/features/rs6000/powerpc-601.c
gdb/features/rs6000/powerpc-602.c
gdb/features/rs6000/powerpc-603.c
gdb/features/rs6000/powerpc-604.c
gdb/features/rs6000/powerpc-64.c
gdb/features/rs6000/powerpc-64l.c
gdb/features/rs6000/powerpc-7400.c
gdb/features/rs6000/powerpc-750.c
gdb/features/rs6000/powerpc-860.c
gdb/features/rs6000/powerpc-altivec32.c
gdb/features/rs6000/powerpc-altivec32l.c
gdb/features/rs6000/powerpc-altivec64.c
gdb/features/rs6000/powerpc-altivec64l.c
gdb/features/rs6000/powerpc-e500.c
gdb/features/rs6000/powerpc-e500l.c
gdb/features/rs6000/powerpc-isa205-32l.c
gdb/features/rs6000/powerpc-isa205-64l.c
gdb/features/rs6000/powerpc-isa205-altivec32l.c
gdb/features/rs6000/powerpc-isa205-altivec64l.c
gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c
gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c
gdb/features/rs6000/powerpc-isa205-vsx32l.c
gdb/features/rs6000/powerpc-isa205-vsx64l.c
gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c
gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c
gdb/features/rs6000/powerpc-isa207-vsx32l.c
gdb/features/rs6000/powerpc-isa207-vsx64l.c
gdb/features/rs6000/powerpc-vsx32.c
gdb/features/rs6000/powerpc-vsx32l.c
gdb/features/rs6000/powerpc-vsx64.c
gdb/features/rs6000/powerpc-vsx64l.c
gdb/features/rs6000/rs6000.c
gdb/features/rx.c
gdb/features/s390-gs-linux64.c
gdb/features/s390-linux32.c
gdb/features/s390-linux32v1.c
gdb/features/s390-linux32v2.c
gdb/features/s390-linux64.c
gdb/features/s390-linux64v1.c
gdb/features/s390-linux64v2.c
gdb/features/s390-te-linux64.c
gdb/features/s390-tevx-linux64.c
gdb/features/s390-vx-linux64.c
gdb/features/s390x-gs-linux64.c
gdb/features/s390x-linux64.c
gdb/features/s390x-linux64v1.c
gdb/features/s390x-linux64v2.c
gdb/features/s390x-te-linux64.c
gdb/features/s390x-tevx-linux64.c
gdb/features/s390x-vx-linux64.c
gdb/features/sparc/sparc32-solaris.c
gdb/features/sparc/sparc64-solaris.c
gdb/features/z80.c
gdb/mips-linux-tdep.h
gdb/nios2-tdep.h
gdb/rs6000-tdep.c
gdb/s390-linux-tdep.h
gdb/s390-tdep.h
gdb/target-descriptions.c