[PATCH, rs6000] Add ppc64_linux_gcc_target_options method
will schmidt
will_schmidt@vnet.ibm.com
Tue Aug 3 18:56:42 GMT 2021
On Thu, 2021-07-29 at 09:16 +0200, Ulrich Weigand wrote:
> "will schmidt" <will_schmidt@vnet.ibm.com> wrote on 27.07.2021
> 17:35:42:
>
> > +/* Implement the linux_gcc_target_options method. */
> > +static std::string
> > +ppc64_linux_gcc_target_options (struct gdbarch *gdbarch)
> > +{
> > + return "-mcmodel=medium";
> > +}
>
> The default version of this hook passes -m32 if the inferior
For reference, the default version of the hook is gdb/arch-utils.c:
default_gcc_target_options() , which reads as:
] std::string
] default_gcc_target_options (struct gdbarch *gdbarch)
] {
] return string_printf ("-m%d%s", gdbarch_ptr_bit (gdbarch),
] (gdbarch_ptr_bit (gdbarch) == 64
] ? " -mcmodel=large" : ""));
] }
> is a 32-bit process. Don't we still need this on PowerPC
> (at least on big-endian)?
Possibly/probably.
I have tried my gdb-compile patches on BE, and can confirm that
the gdb-compile support needs some work there too. I will need to
double-check to ensure that this proposed change did not self-inflict
some of that trouble when I tried on BE. It's possible I both fixed
and broke myself within the one patch set.
> Also, if -mcmodel=medium is the default, we don't actually
> have to explicitly specify it. Just omitting the
> -mcmodel=large should be sufficient.
Thats a good point, so I'll likely change this to just return "".
> + return "-mcmodel=medium";
I'll rework/repost. Thanks for the review.
Thanks,
-Will
>
> Bye,
> Ulrich
>
>
More information about the Gdb-patches
mailing list