Commit 64405360cee33a058d7e07713af23aca43b96d41

Authored by Al Viro
Committed by Richard Weinberger
1 parent c6b17bbd39

um: don't bother trying to rebuild CHECKFLAGS for USER_OBJS

... just strip NOSTDINC_FLAGS out of it for those

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>

Showing 1 changed file with 3 additions and 4 deletions Inline Diff

arch/um/scripts/Makefile.rules
1 # =========================================================================== 1 # ===========================================================================
2 # arch/um: Generic definitions 2 # arch/um: Generic definitions
3 # =========================================================================== 3 # ===========================================================================
4 4
5 USER_SINGLE_OBJS := \ 5 USER_SINGLE_OBJS := \
6 $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs)) 6 $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
7 USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) 7 USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS))
8 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) 8 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
9 9
10 $(USER_OBJS:.o=.%): \ 10 $(USER_OBJS:.o=.%): \
11 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h $(CFLAGS_$(basetarget).o) 11 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h $(CFLAGS_$(basetarget).o)
12 $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
13 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
14 12
15 # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of 13 # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
16 # using it directly. 14 # using it directly.
17 UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file)) 15 UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))
18 16
19 $(UNPROFILE_OBJS:.o=.%): \ 17 $(UNPROFILE_OBJS:.o=.%): \
20 c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o) 18 c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
21 $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ 19
22 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF) 20 $(USER_OBJS) $(UNPROFILE_OBJS): \
21 CHECKFLAGS := $(patsubst $(NOSTDINC_FLAGS),,$(CHECKFLAGS))
23 22
24 # The stubs can't try to call mcount or update basic block data 23 # The stubs can't try to call mcount or update basic block data
25 define unprofile 24 define unprofile
26 $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) 25 $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
27 endef 26 endef