Re: lib///lzo/lzodefs.h:27:2: error: #error "conflicting endian definitions"
From: Arnd Bergmann
Date: Wed Mar 14 2018 - 17:31:41 EST
On Wed, Mar 14, 2018 at 3:16 AM, kbuild test robot
<fengguang.wu@xxxxxxxxx> wrote:
> Hi Arnd,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: fc6eabbbf8ef99efed778dd5afabc83c21dba585
> commit: 101110f6271ce956a049250c907bc960030577f8 Kbuild: always define endianess in kconfig.h
> date: 3 weeks ago
> config: m32r-allmodconfig (attached as .config)
> compiler: m32r-linux-gcc (GCC) 7.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 101110f6271ce956a049250c907bc960030577f8
> # save the attached .config to linux build tree
> make.cross ARCH=m32r
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/m32r/include/uapi/asm/byteorder.h:8:0,
> from arch/m32r/include/asm/bitops.h:22,
> from include/linux/bitops.h:38,
> from include/linux/kernel.h:11,
> from include/linux/list.h:9,
> from include/linux/module.h:9,
> from lib///lzo/lzo1x_compress.c:14:
> include/linux/byteorder/big_endian.h:8:2: warning: #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN [-Wcpp]
> #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN
I did now get around to looking at this, sorry for the delay.
The thing is that the warning shows an actual bug when it was previously
broken silently. The configuration sets CONFIG_CPU_LITTLE_ENDIAN
but the compiler only supports big-endian mode.
The m32r architecture is being removed in linux-4.17 as we have shown
that there are no remaining users, so I would suggest not doing anything
here and leaving the warning in place.
Arnd