build error on new version gcc
matianfu opened this issue · comments
Tianfu Ma commented
On Ubuntu 19.10 or Debian 10, where aarch64-linux-gnu-gcc version is 8.3.
In file included from drivers/mtd/spi/spi_flash.c:18:
include/linux/log2.h:19:1: error: ignoring attribute ‘noreturn’ because it conflicts with attribute ‘const’ [-Werror=attributes]
int ____ilog2_NaN(void);
^~~
https://patchwork.ozlabs.org/patch/909905/
This patch is required. Other problem could be supressed by modifying CFLAGS in Makefile.
Tianfu Ma commented
An alternative solutions is add the following flags to KBUILD_CFLAGS in Makefile
362 -Wno-attributes \
363 -Wno-tautological-compare \
Kever Yang commented
Will fixed, the patch has been merged internally.