Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 # ===========================================================================
0003 # arch/um: Generic definitions
0004 # ===========================================================================
0005 
0006 USER_SINGLE_OBJS := \
0007         $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
0008 USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m)  $(USER_SINGLE_OBJS))
0009 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
0010 
0011 $(USER_OBJS:.o=.%): \
0012         c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include $(srctree)/include/linux/kern_levels.h -include user.h $(CFLAGS_$(basetarget).o) 
0013 
0014 # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
0015 # using it directly.
0016 UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))
0017 
0018 $(UNPROFILE_OBJS:.o=.%): \
0019         c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
0020 
0021 $(USER_OBJS) $(UNPROFILE_OBJS): \
0022         CHECKFLAGS := $(patsubst $(NOSTDINC_FLAGS),,$(CHECKFLAGS))
0023 
0024 # The stubs can't try to call mcount or update basic block data
0025 define unprofile
0026         $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
0027 endef