From 51f545b9c16f6a371c129bd0fbb9c7f7ae339df3 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 13 Jul 2017 13:59:28 +0800 Subject: [PATCH] fix build error gcc7 Upstream-Status: Pending --- Makefile.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.build b/Makefile.build index e93cc9a..f6028fe 100644 --- a/Makefile.build +++ b/Makefile.build @@ -35,7 +35,8 @@ GENASSYM=$(libos)lib/genassym.sh export libos := $(src)libos/ -export CC=$(CROSS_COMPILE)gcc + + export GCCINCDIR := $(shell $(CC) -print-file-name=include) CC_OPTS=-Wa,-m$(CONFIG_GCC_CPU_FLAG) -nostdinc -I $(GCCINCDIR) -I $(GCCINCDIR)-fixed \ @@ -46,8 +47,8 @@ CC_OPTS=-Wa,-m$(CONFIG_GCC_CPU_FLAG) -nostdinc -I $(GCCINCDIR) -I $(GCCINCDIR)-f export CC_OPTS_NODEP := -include include/config/autoconf.h export WARNINGS := -Wwrite-strings -Wmissing-prototypes \ - -Wstrict-prototypes -Wold-style-definition \ - -Wmissing-declarations + -Wstrict-prototypes -Wold-style-definition -Wno-format-truncation \ + -Wmissing-declarations # Our code should build without any of these warnings, but some # external code may be excluded. -- 2.7.4