From 533f04079c7de9a56f3c463ff1669d2c9eb5a576 Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Wed, 18 Aug 2021 11:45:49 -0500 Subject: [PATCH] [gdb] [rs6000] Add ppc64_linux_gcc_target_options method. Add a method to set the gcc target options for the ppc64 targets. This change sets an empty value, which allows the gcc default values (-mcmodel=medium) be used, instead of -mcmodel=large which is set by the default_gcc_target_options hook. --- gdb/ppc-linux-tdep.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 4be75d1035e..ea8e3b98fa4 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1997,6 +1997,14 @@ ppc64_gnu_triplet_regexp (struct gdbarch *gdbarch) return "p(ower)?pc64"; } +/* Implement the linux_gcc_target_options method. */ + +static std::string +ppc64_linux_gcc_target_options (struct gdbarch *gdbarch) +{ + return ""; +} + static void ppc_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) @@ -2132,6 +2140,8 @@ ppc_linux_init_abi (struct gdbarch_info info, set_gdbarch_gnu_triplet_regexp (gdbarch, ppc64le_gnu_triplet_regexp); else set_gdbarch_gnu_triplet_regexp (gdbarch, ppc64_gnu_triplet_regexp); + /* Set GCC target options. */ + set_gdbarch_gcc_target_options (gdbarch, ppc64_linux_gcc_target_options); } set_gdbarch_core_read_description (gdbarch, ppc_linux_core_read_description); -- 2.30.2