https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108240

--- Comment #6 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Kewen Lin from comment #5)
> (In reply to Segher Boessenkool from comment #4)
> > (In reply to Kewen Lin from comment #3)
> > > With the culprit commit r13-4894, we always implicitly enable powerpc64 
> > > for
> > > both explicit and implicit 64 bit, it's the same as before for the 
> > > explicit
> > > 64 bit case, but for the implicit 64 bit case, there is no chance for the
> > > used cpu to unset powerpc64 (like this case). To keep it consistent with 
> > > the
> > > previous, the fix can be to only enable powerpc64 implicitly for explicit 
> > > 64
> > > bit, while let it be for implicit 64 bit.
> > 
> > No?  If the user says to use a CPU without 64-bit instructions, while the
> > user also says we require 64-bit insns (via -m64), we should just error.
> 
> But both the previous behavior (before r13-4894) and the current behavior
> (starting from r13-4894) honour the given explicit -m64, it would always
> enable -mpowerpc64 at the same time without any errors/warnings.
> 

It's implied that when the user explicitly specify -m64, the handlings would
neglect the impact of CPU, I'm not sure if it's intentional but the reason
probably is that the underlying CPU is actually 64 bit in most cases, so make
-m64 win and the compilation can go forward.

If we change the behavior to error for both explicit and implicit 64 bit, some
compilations which worked in the past can start to fail (though it's arguable
that it's expected). Note that for implicit 64 bit and no powerpc64, we gets
errors on Linux but just warnings on darwin/aix (maybe more fallouts come out
on them). So considering the current release phase, I'm inclined to just make
it consistent with the previous, and try to adjust the behavior (as Segher's
proposal) in next release.

Reply via email to