Re: [PATCH v1] PowerPC: Use -mcmodel=large for the compile command
Abhay Kandpal <[email protected]> Tue, 28 Jul 2026 23:19:48 +0530
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------rSS7IGJg58O03xbXkU3WZpDA Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thanks Ulrich — v2 fully reverts 533f04079c7 as you suggested, so ppc64 uses default_gcc_target_options. BR, Abhay On 28/07/26 15:54, Ulrich Weigand wrote: > 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 --------------rSS7IGJg58O03xbXkU3WZpDA Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <pre><span><span>Thanks Ulrich — v2 fully reverts 533f04079c7 as you suggested, so </span></span><span>ppc64 uses default_gcc_target_options. BR, Abhay</span></pre> <div class="moz-cite-prefix">On 28/07/26 15:54, Ulrich Weigand wrote:<br> </div> <blockquote type="cite" cite="mid:[email protected]"> <pre wrap="" class="moz-quote-pre">Abhay Kandpal <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a> wrote: </pre> <blockquote type="cite"> <pre wrap="" class="moz-quote-pre">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. </pre> </blockquote> <pre wrap="" class="moz-quote-pre"> 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 </pre> </blockquote> </body> </html> --------------rSS7IGJg58O03xbXkU3WZpDA--