Re: [PATCH v1] PowerPC: Use -mcmodel=large for the compile command

Ulrich Weigand <[email protected]> Tue, 28 Jul 2026 10:24:12 +0000
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
Abhay Kandpal <[email protected]> wrote:

>The cause is the code model used to compile the injected object.
>Commit 533f04079c7 ("[gdb] [rs6000] Add
>ppc64_linux_gcc_target_options method.") made ppc64 return an empty
>string from gdbarch_gcc_target_options, overriding the
>"-mcmodel=large" that default_gcc_target_options supplies for 64-bit
>targets, so GCC falls back to -mcmodel=medium.

I can see why large model is more appropriate for this type
of compilation.  However, your patch just reverts the effect
of the above commit, without actually reverting it.  (This
causes ppc64_linux_gcc_target_options to pretty much duplicate
default_gcc_target_options.)  I think it would be preferable
to fully revert the commit instead.

Bye,
Ulrich