]> git.baikalelectronics.ru Git - kernel.git/commit
sh: define __BIG_ENDIAN for math-emu
authorRandy Dunlap <rdunlap@infradead.org>
Tue, 5 Oct 2021 00:19:13 +0000 (17:19 -0700)
committerRich Felker <dalias@libc.org>
Wed, 27 Oct 2021 20:51:24 +0000 (16:51 -0400)
commit14bef5dc60e92111dc885f405e4216654c525542
tree457968604512e409eeff643aaa0207f9ec05f33d
parent2172cfa6e6193443f165466baeb7da4d2e8fc0de
sh: define __BIG_ENDIAN for math-emu

Fix this by defining both ENDIAN macros in
<asm/sfp-machine.h> so that they can be utilized in
<math-emu/soft-fp.h> according to the latter's comment:
/* Allow sfp-machine to have its own byte order definitions. */

(This is what is done in arch/nds32/include/asm/sfp-machine.h.)

This placates these build warnings:

In file included from ../arch/sh/math-emu/math.c:23:
.../include/math-emu/single.h:50:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef]
   50 | #if __BYTE_ORDER == __BIG_ENDIAN
In file included from ../arch/sh/math-emu/math.c:24:
.../include/math-emu/double.h:59:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef]
   59 | #if __BYTE_ORDER == __BIG_ENDIAN

Fixes: ad2276e8cc0c ("sh: math-emu support")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/include/asm/sfp-machine.h