binutils-gdb/gdb/arch/ppc-linux-tdesc.h
Keith Seitz ac9b8c676e 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
2022-09-29 10:00:13 -07:00

47 lines
2.0 KiB
C

/* Target description declarations shared between gdb, gdbserver and IPA.
Copyright (C) 2018-2022 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef ARCH_PPC_LINUX_TDESC_H
#define ARCH_PPC_LINUX_TDESC_H
struct target_desc;
extern const struct target_desc *tdesc_powerpc_32l;
extern const struct target_desc *tdesc_powerpc_altivec32l;
extern const struct target_desc *tdesc_powerpc_vsx32l;
extern const struct target_desc *tdesc_powerpc_isa205_32l;
extern const struct target_desc *tdesc_powerpc_isa205_altivec32l;
extern const struct target_desc *tdesc_powerpc_isa205_vsx32l;
extern const struct target_desc *tdesc_powerpc_isa205_ppr_dscr_vsx32l;
extern const struct target_desc *tdesc_powerpc_isa207_vsx32l;
extern const struct target_desc *tdesc_powerpc_isa207_htm_vsx32l;
extern const struct target_desc *tdesc_powerpc_e500l;
extern const struct target_desc *tdesc_powerpc_64l;
extern const struct target_desc *tdesc_powerpc_altivec64l;
extern const struct target_desc *tdesc_powerpc_vsx64l;
extern const struct target_desc *tdesc_powerpc_isa205_64l;
extern const struct target_desc *tdesc_powerpc_isa205_altivec64l;
extern const struct target_desc *tdesc_powerpc_isa205_vsx64l;
extern const struct target_desc *tdesc_powerpc_isa205_ppr_dscr_vsx64l;
extern const struct target_desc *tdesc_powerpc_isa207_vsx64l;
extern const struct target_desc *tdesc_powerpc_isa207_htm_vsx64l;
#endif /* ARCH_PPC_LINUX_TDESC_H */