path: root/arch/sandbox/Makefile
diff options
authorLoïc Minier <>2011-10-14 00:06:37 +0200
committerSascha Hauer <>2011-10-18 09:18:41 +0200
commit4e26fba6803b0b4820875df50ed733eeb4980d60 (patch)
tree6c88ff0a3b11b1308097a856431d1452ce3f9ad7 /arch/sandbox/Makefile
parent2b5d8792ac7c95f41f3d5fced553450eea9b40f8 (diff)
Only pass -P to cpp when generating ld scripts
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 <sys/socket.h> 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/ also does nowadays. Signed-off-by: Loïc Minier <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'arch/sandbox/Makefile')
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index 4ca17ed839..73c06db09c 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -10,7 +10,6 @@ lds-y := $(BOARD)/
CFLAGS += -Dmalloc=barebox_malloc \
-Dfree=barebox_free -Drealloc=barebox_realloc \
-Dread=barebox_read -Dwrite=barebox_write \