diff options
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -332,9 +332,7 @@ KALLSYMS = scripts/kallsyms | |||
332 | PERL = perl | 332 | PERL = perl |
333 | CHECK = sparse | 333 | CHECK = sparse |
334 | 334 | ||
335 | NOSTDINC_FLAGS = -nostdinc -isystem $(shell $(CC) -print-file-name=include) | ||
336 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ | 335 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ |
337 | CHECKFLAGS += $(NOSTDINC_FLAGS) | ||
338 | MODFLAGS = -DMODULE | 336 | MODFLAGS = -DMODULE |
339 | CFLAGS_MODULE = $(MODFLAGS) | 337 | CFLAGS_MODULE = $(MODFLAGS) |
340 | AFLAGS_MODULE = $(MODFLAGS) | 338 | AFLAGS_MODULE = $(MODFLAGS) |
@@ -531,6 +529,10 @@ endif | |||
531 | 529 | ||
532 | include $(srctree)/arch/$(ARCH)/Makefile | 530 | include $(srctree)/arch/$(ARCH)/Makefile |
533 | 531 | ||
532 | # arch Makefile may override CC so keep this after arch Makefile is included | ||
533 | NOSTDINC_FLAGS := -nostdinc -isystem $(shell $(CC) -print-file-name=include) | ||
534 | CHECKFLAGS += $(NOSTDINC_FLAGS) | ||
535 | |||
534 | # warn about C99 declaration after statement | 536 | # warn about C99 declaration after statement |
535 | CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) | 537 | CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) |
536 | 538 | ||