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

From: Maciej W. Rozycki
Date: Thu Apr 21 2016 - 15:55:57 EST


On Thu, 21 Apr 2016, Fengguang Wu wrote:

> > -mcompact-branches=optimal is an option for the latest version of the MIPS
> > architecture which is enabled by mips-malta_qemu_32r6_defconfig but your
> > compiler is too old, doesn't support R6. Unfortunately there's no simple
> > way to run a test on the build environment from kconfig or even before
> > kconfig runs so we've just ignord this particular build issue. Plus
> > there being the additional issue that we only know the toolchain to be
> > used after certain options have been picked.
>
> We are running Debian's mips cross compiler.
>
> % 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.

Maciej