Commit 2c1582699872d38682b136b1446953ee351bc7e1

Authored by Roland McGrath
Committed by Linus Torvalds
1 parent 31f1de46b9

x86: vdso_install fix

The makefile magic for installing the 32-bit vdso images on disk had a
little error.  A single-line change would fix that bug, but this does a
little more to reduce the error-prone duplication of this bit of
makefile variable magic.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 12 additions and 10 deletions Side-by-side Diff

arch/x86/vdso/Makefile
... ... @@ -7,7 +7,7 @@
7 7 VDSO32-$(CONFIG_COMPAT) := y
8 8  
9 9 vdso-install-$(VDSO64-y) += vdso.so
10   -vdso-install-$(VDSO32-y) += $(vdso32-y:=.so)
  10 +vdso-install-$(VDSO32-y) += $(vdso32-images)
11 11  
12 12  
13 13 # files to link into the vdso
... ... @@ -63,6 +63,8 @@
63 63 vdso32.so-$(CONFIG_COMPAT) += syscall
64 64 vdso32.so-$(VDSO32-y) += sysenter
65 65  
  66 +vdso32-images = $(vdso32.so-y:%=vdso32-%.so)
  67 +
66 68 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
67 69 VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1
68 70  
69 71  
70 72  
71 73  
72 74  
... ... @@ -71,21 +73,21 @@
71 73 override obj-dirs = $(dir $(obj)) $(obj)/vdso32/
72 74  
73 75 targets += vdso32/vdso32.lds
74   -targets += $(vdso32.so-y:%=vdso32-%.so.dbg) $(vdso32.so-y:%=vdso32-%.so)
  76 +targets += $(vdso32-images) $(vdso32-images:=.dbg)
75 77 targets += vdso32/note.o $(vdso32.so-y:%=vdso32/%.o)
76 78  
77   -extra-y += $(vdso32.so-y:%=vdso32-%.so)
  79 +extra-y += $(vdso32-images)
78 80  
79   -$(obj)/vdso32.o: $(vdso32.so-y:%=$(obj)/vdso32-%.so)
  81 +$(obj)/vdso32.o: $(vdso32-images:%=$(obj)/%)
80 82  
81 83 KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS))
82   -$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
83   -$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): asflags-$(CONFIG_X86_64) += -m32
  84 +$(vdso32-images:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
  85 +$(vdso32-images:%=$(obj)/%.dbg): asflags-$(CONFIG_X86_64) += -m32
84 86  
85   -$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): $(obj)/vdso32-%.so.dbg: FORCE \
86   - $(obj)/vdso32/vdso32.lds \
87   - $(obj)/vdso32/note.o \
88   - $(obj)/vdso32/%.o
  87 +$(vdso32-images:%=$(obj)/%.dbg): $(obj)/vdso32-%.so.dbg: FORCE \
  88 + $(obj)/vdso32/vdso32.lds \
  89 + $(obj)/vdso32/note.o \
  90 + $(obj)/vdso32/%.o
89 91 $(call if_changed,vdso)
90 92  
91 93 # Make vdso32-*-syms.lds from each image, and then make sure they match.