]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb] [rs6000] Add ppc64_linux_gcc_target_options method.
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Wed, 18 Aug 2021 16:45:49 +0000 (11:45 -0500)
committerWill Schmidt <will_schmidt@vnet.ibm.com>
Wed, 18 Aug 2021 16:45:49 +0000 (11:45 -0500)
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

index 4be75d1035ee3a014d2fc3f6d8a09f1c81b01bba..ea8e3b98fa4cd69d28a881e392bdd55942e0561e 100644 (file)
@@ -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);