Subject: Re: [PATCH] powerpc/math-emu: Fix building with clang

From: Segher Boessenkool <[email-masked]>
Date: Mon, 12 Nov 2018 06:43:04 -0600

On Mon, Nov 12, 2018 at 10:03:34PM +1030, Joel Stanley wrote:
> arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a
> inline asm context requiring an l-value: remove
>       the cast or build with -fheinous-gnu-extensions

...

> ./arch/powerpc/include/asm/sfp-machine.h:283:27: note: expanded from
> macro 'sub_ddmmss'
>                : "=r" ((USItype)(sh)),                                  \
>                        ~~~~~~~~~~^~~

This was fixed in GCC over 16 years ago ( https://gcc.gnu.org/r56600 ),
and in GMP (where it comes from) presumably before that.

There are many projects around which still have old GMP snippets in
them.  Like, the Linux kernel for powerpc, or GCC for x86!

Segher