From 4e26fba6803b0b4820875df50ed733eeb4980d60 Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Fri, 14 Oct 2011 00:06:37 +0200 Subject: Only pass -P to cpp when generating ld scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building sandbox with ccache, one would hit warnings such as: warning: 'struct mmsghdr' declared inside parameter list on random files; a way to reproduce this issue is to build a simple file doing just: #include int main(void) { return 0; } gcc -Wall -P -c -o foo foo.c But actually the -P flag is only useful when generating non-C files, such as linker scripts in the case of barebox. Removing the -P flag from all the gcc invocations, except when generating .lds files makes the warning go away. It turns out that this is what linux/scripts/Makefile.build also does nowadays. Signed-off-by: Loïc Minier Signed-off-by: Sascha Hauer --- arch/blackfin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 902268da70..a0b87f77d7 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile @@ -7,7 +7,7 @@ cpu-$(CONFIG_BF561) := bf561 TEXT_BASE = $(CONFIG_TEXT_BASE) -CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P +CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) CFLAGS += -D__blackfin__ # -Ttext $(TEXT_BASE) KALLSYMS += --symbol-prefix=_ -- cgit v1.2.3