rockchip-linux / u-boot

U-Boot tree for pending commits
113 stars 79 forks source link

build error on new version gcc #45

Open matianfu opened 5 years ago

matianfu commented 5 years ago

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.

matianfu commented 5 years ago

An alternative solutions is add the following flags to KBUILD_CFLAGS in Makefile

 362         -Wno-attributes \
 363         -Wno-tautological-compare \
keveryang commented 5 years ago

Will fixed, the patch has been merged internally.