diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 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 | ||
@@ -1188,8 +1190,8 @@ cmd_TAGS = $(all-sources) | etags - | |||
1188 | quiet_cmd_tags = MAKE $@ | 1190 | quiet_cmd_tags = MAKE $@ |
1189 | define cmd_tags | 1191 | define cmd_tags |
1190 | rm -f $@; \ | 1192 | rm -f $@; \ |
1191 | CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL"`; \ | 1193 | CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \ |
1192 | $(all-sources) | xargs ctags $$CTAGSF -a --extra=+f | 1194 | $(all-sources) | xargs ctags $$CTAGSF -a |
1193 | endef | 1195 | endef |
1194 | 1196 | ||
1195 | TAGS: FORCE | 1197 | TAGS: FORCE |