diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/ia32/Makefile | 25 | ||||
-rw-r--r-- | arch/x86_64/Makefile | 7 |
2 files changed, 27 insertions, 5 deletions
diff --git a/arch/x86/ia32/Makefile b/arch/x86/ia32/Makefile index cdae36435e21..e2edda255a84 100644 --- a/arch/x86/ia32/Makefile +++ b/arch/x86/ia32/Makefile | |||
@@ -18,18 +18,35 @@ $(obj)/syscall32_syscall.o: \ | |||
18 | $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) | 18 | $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) |
19 | 19 | ||
20 | # Teach kbuild about targets | 20 | # Teach kbuild about targets |
21 | targets := $(foreach F,sysenter syscall,vsyscall-$F.o vsyscall-$F.so) | 21 | targets := $(foreach F,$(addprefix vsyscall-,sysenter syscall),\ |
22 | $F.o $F.so $F.so.dbg) | ||
22 | 23 | ||
23 | # The DSO images are built using a special linker script | 24 | # The DSO images are built using a special linker script |
24 | quiet_cmd_syscall = SYSCALL $@ | 25 | quiet_cmd_syscall = SYSCALL $@ |
25 | cmd_syscall = $(CC) -m32 -nostdlib -shared -s \ | 26 | cmd_syscall = $(CC) -m32 -nostdlib -shared \ |
26 | $(call ld-option, -Wl$(comma)--hash-style=sysv) \ | 27 | $(call ld-option, -Wl$(comma)--hash-style=sysv) \ |
27 | -Wl,-soname=linux-gate.so.1 -o $@ \ | 28 | -Wl,-soname=linux-gate.so.1 -o $@ \ |
28 | -Wl,-T,$(filter-out FORCE,$^) | 29 | -Wl,-T,$(filter-out FORCE,$^) |
29 | 30 | ||
30 | $(obj)/vsyscall-sysenter.so $(obj)/vsyscall-syscall.so: \ | 31 | $(obj)/%.so: OBJCOPYFLAGS := -S |
31 | $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE | 32 | $(obj)/%.so: $(obj)/%.so.dbg FORCE |
33 | $(call if_changed,objcopy) | ||
34 | |||
35 | $(obj)/vsyscall-sysenter.so.dbg $(obj)/vsyscall-syscall.so.dbg: \ | ||
36 | $(obj)/vsyscall-%.so.dbg: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE | ||
32 | $(call if_changed,syscall) | 37 | $(call if_changed,syscall) |
33 | 38 | ||
34 | AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 | 39 | AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 |
35 | AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 | 40 | AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 |
41 | |||
42 | vdsos := vdso32-sysenter.so vdso32-syscall.so | ||
43 | |||
44 | quiet_cmd_vdso_install = INSTALL $@ | ||
45 | cmd_vdso_install = cp $(@:vdso32-%.so=$(obj)/vsyscall-%.so.dbg) \ | ||
46 | $(MODLIB)/vdso/$@ | ||
47 | |||
48 | $(vdsos): | ||
49 | @mkdir -p $(MODLIB)/vdso | ||
50 | $(call cmd,vdso_install) | ||
51 | |||
52 | vdso_install: $(vdsos) | ||
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 9daa32d1d2a1..d460bef2ab89 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -110,9 +110,14 @@ bzdisk: vmlinux | |||
110 | fdimage fdimage144 fdimage288 isoimage: vmlinux | 110 | fdimage fdimage144 fdimage288 isoimage: vmlinux |
111 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ | 111 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ |
112 | 112 | ||
113 | install: | 113 | install: vdso_install |
114 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ | 114 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ |
115 | 115 | ||
116 | vdso_install: | ||
117 | ifeq ($(CONFIG_IA32_EMULATION),y) | ||
118 | $(Q)$(MAKE) $(build)=arch/x86/ia32 $@ | ||
119 | endif | ||
120 | |||
116 | archclean: | 121 | archclean: |
117 | $(Q)rm -rf $(objtree)/arch/x86_64/boot | 122 | $(Q)rm -rf $(objtree)/arch/x86_64/boot |
118 | $(Q)$(MAKE) $(clean)=$(boot) | 123 | $(Q)$(MAKE) $(clean)=$(boot) |