MIPS: Support binutils configured with --enable-mips-fix-loongson3-llsc=yes
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 9 Jan 2021 19:30:47 +0000 (20:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:25 +0000 (11:38 +0100)
commit3896c324bb252f9398b024a4166241bd1d9a241a
tree27612b7b05919b421dac99e4b6051befbed4411f
parenta799741acdb630f40d4fb51e3e9eaf7bb958fe41
MIPS: Support binutils configured with --enable-mips-fix-loongson3-llsc=yes

commit 5373ae67c3aad1ab306cc722b5a80b831eb4d4d1 upstream.

From version 2.35, binutils can be configured with
--enable-mips-fix-loongson3-llsc=yes, which means it defaults to
-mfix-loongson3-llsc. This breaks labels which might then point at the
wrong instruction.

The workaround to explicitly pass -mno-fix-loongson3-llsc has been
added in Linux version 5.1, but is only enabled when building a Loongson
64 kernel. As vendors might use a common toolchain for building Loongson
and non-Loongson kernels, just move that workaround to
arch/mips/Makefile. At the same time update the comments to reflect the
current status.

Cc: stable@vger.kernel.org # 5.1+
Cc: YunQiang Su <syq@debian.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/Makefile
arch/mips/loongson64/Platform