On Wed, Aug 31, 2022 at 10:48:26AM -0500, Peter Bergner wrote:
> On 8/31/22 10:24 AM, Segher Boessenkool wrote:
> > Should *any* explicit command line flag ever be disabled like that?
> > (Not talking about things like -m32 -m64, ...
> 
> In a general sense, I'd agree that the answer is no, but we do have
> dependent options like -maltivec and -mvsx, etc., so a -mno-altivec
> better disable any explicit -mvsx earlier on the command line.

Yes, but those two flags are tightly related.  -m32/-m64 and -mpowerpc64
are not, code model and instruction set selection are orthogonal.

> Ditto for -msoft-float better disable any -maltivec and -mvsx, etc.

Oh?  Why should it disable -maltivec?  -mvsx makes a little sense on
one hand, but totally none on the other either.

> It's complicated...and that's a bad thing. :-(

Yes.  And most of it is caused by us, instead of being a fact of life.

> > -mpowerpc64 -m32 should always mean the same as -m32 -mpowerpc64, that's
> > the principle of least surprise.
> 
> I think I agree with this, since -mpowerpc64 doesn't mean or imply -m64.
> I say "think", because I don't remember the history of why it behaves this
> way and maybe there was a reason we did like this?  If there isn't a reason,
> then I'm all for -m32 not overriding -mpowerpc64.

As far as I always knew it does *not* override it, so this seems like
an accident to me, not detected before  because everyone always types
-m32 -mpowerpc64 (I know I do, anyway).

I think we should just fix this and see what breaks, if anything?


Segher

Reply via email to