| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
obj-y := stub.o mmu.o process.o syscall.o uaccess.o \ |
| 7 |
stub_exe_embed.o |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
stub_exe_objs-y := stub_exe.o |
| 12 |
|
| 13 |
stub_exe_objs := $(foreach F,$(stub_exe_objs-y),$(obj)/$F) |
| 14 |
|
| 15 |
|
| 16 |
$(obj)/stub_exe_embed.o: $(src)/stub_exe_embed.S $(obj)/stub_exe |
| 17 |
|
| 18 |
$(obj)/stub_exe.dbg: $(stub_exe_objs) FORCE |
| 19 |
$(call if_changed,stub_exe) |
| 20 |
|
| 21 |
$(obj)/stub_exe: OBJCOPYFLAGS := -S |
| 22 |
$(obj)/stub_exe: $(obj)/stub_exe.dbg FORCE |
| 23 |
$(call if_changed,objcopy) |
| 24 |
|
| 25 |
quiet_cmd_stub_exe = STUB_EXE $@ |
| 26 |
cmd_stub_exe = $(CC) -nostdlib -o $@ \ |
| 27 |
$(filter-out $(UM_GPROF_OPT) $(UM_GCOV_OPT),$(KBUILD_CFLAGS)) $(STUB_EXE_LDFLAGS) \ |
| 28 |
$(filter %.o,$^) |
| 29 |
|
| 30 |
STUB_EXE_LDFLAGS = -Wl,-n -static |
| 31 |
|
| 32 |
targets += stub_exe.dbg stub_exe $(stub_exe_objs-y) |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
CFLAGS_stub.o := $(CFLAGS_NO_HARDENING) |
| 41 |
CFLAGS_stub_exe.o := $(CFLAGS_NO_HARDENING) |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
CFLAGS_stub_exe.o += $(call cc-option, -ftrivial-auto-var-init=uninitialized) |
| 46 |
|
| 47 |
UNPROFILE_OBJS := stub.o stub_exe.o |
| 48 |
KCOV_INSTRUMENT := n |
| 49 |
|
| 50 |
include $(srctree)/arch/um/scripts/Makefile.rules |