On Fri, Sep 11, 2020 at 04:43:50AM -0300, Alexandre Oliva wrote: > Could you please shed any light as to the intent, so that we can sort > out the logic that will implement it?
The history goes back to 2003 commit 9739c90c8d where a ppc64-linux host built most of gcc with -mminimal-toc due to toc/got size constraints of the small model, but build libgcc with -mno-minimal-toc. When the medium/large model was implemented, I thought it good to continue compiling libgcc in small model. We'd like to keep doing that too. That's why -mno-minimal-toc, an option valid for both ppc32 and ppc64, chooses small model on ppc64 when the compiler default is medium model. If you change that then make sure that libgcc continues to be small model. And any other code that might have copied the libgcc trick.. I also thought it reasonable to error on an explicit -mcmodel=medium or -mcmodel=large with either of -mminimal-toc or -mno-minimal-toc, since the toc options really are specific to small model code. Why change that? -- Alan Modra Australia Development Lab, IBM