Re: [kbuild-all] mipsel-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal'

From: Ralf Baechle
Date: Thu Apr 21 2016 - 16:34:23 EST


On Thu, Apr 21, 2016 at 08:55:34PM +0100, Maciej W. Rozycki wrote:

> > % mips-linux-gnu-gcc --version
> > mips-linux-gnu-gcc (Debian 5.2.1-16) 5.2.1 20150903
> > Copyright (C) 2015 Free Software Foundation, Inc.
> >
> > How about temporarily disable that error, until we upgrade to a new
> > gcc version which supports the -mcompact-branches option?
>
> I don't think it makes sense as the compiler won't support MIPSr6 code
> anyway, so first it'll bail out on `-march=mips32r6', and if we go even
> further and disable that too, then GAS will probably break somewhere on
> inline asm and GCC will produce code which does not make sense otherwise.

GCC 5.2.0 claims to support mips32r6 and mips64r6. It's just the option
-mcompact-branches which seem to have been added later only.

Ralf