Skip to content

Commit ccea15f

Browse files
Paolo 'Blaisorblade' GiarrussoLinus Torvalds
authored andcommitted
[PATCH] uml: support sparse for userspace files
Make sparse checker work for userspace files - it normally gets -nostdinc separately, so avoid having it for userspace files. Also, add -D$(SUBARCH) for multiarch hosts (i.e. AMD64 with compatibility headers). It works, the only problem is a bit of bogus warnings for system headers, but they're not too many. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent f53389d commit ccea15f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎arch/um/scripts/Makefile.rules‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
99

1010
$(USER_OBJS) $(USER_OBJS:.o=.i) $(USER_OBJS:.o=.s) $(USER_OBJS:.o=.lst): \
1111
c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(notdir $@))
12-
$(USER_OBJS): cmd_checksrc =
13-
$(USER_OBJS): quiet_cmd_checksrc =
14-
$(USER_OBJS): cmd_force_checksrc =
15-
$(USER_OBJS): quiet_cmd_force_checksrc =
12+
$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
13+
-Dunix -D__unix__ -D__$(SUBARCH)__
1614

1715

1816
# The stubs and unmap.o can't try to call mcount or update basic block data

0 commit comments

Comments
 (0)