diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2016-08-09 08:17:29 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-08-10 09:04:12 -0400 |
commit | b9a4a0d02c5b8d9a1397c11d741d2a1a56381178 (patch) | |
tree | 3babcde800ea58103662699718056348af96c925 | |
parent | 164af597ce945751e2dcd53d0a86e84203a6d117 (diff) |
powerpc/vdso: Fix build rules to rebuild vdsos correctly
When using if_changed, we need to add FORCE as a dependency (see
Documentation/kbuild/makefiles.txt) otherwise we don't get command line
change checking amongst other things. This has resulted in vdsos not
being rebuilt when switching between big and little endian.
The vdso64/32ld commands have to be changed around to avoid pulling
FORCE into the linker command line (code copied from x86).
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/kernel/vdso32/Makefile | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso64/Makefile | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile index cbabd143acae..78a7449bf489 100644 --- a/arch/powerpc/kernel/vdso32/Makefile +++ b/arch/powerpc/kernel/vdso32/Makefile | |||
@@ -30,7 +30,7 @@ CPPFLAGS_vdso32.lds += -P -C -Upowerpc | |||
30 | $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so | 30 | $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so |
31 | 31 | ||
32 | # link rule for the .so file, .lds has to be first | 32 | # link rule for the .so file, .lds has to be first |
33 | $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) | 33 | $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE |
34 | $(call if_changed,vdso32ld) | 34 | $(call if_changed,vdso32ld) |
35 | 35 | ||
36 | # strip rule for the .so file | 36 | # strip rule for the .so file |
@@ -39,12 +39,12 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE | |||
39 | $(call if_changed,objcopy) | 39 | $(call if_changed,objcopy) |
40 | 40 | ||
41 | # assembly rules for the .S files | 41 | # assembly rules for the .S files |
42 | $(obj-vdso32): %.o: %.S | 42 | $(obj-vdso32): %.o: %.S FORCE |
43 | $(call if_changed_dep,vdso32as) | 43 | $(call if_changed_dep,vdso32as) |
44 | 44 | ||
45 | # actual build commands | 45 | # actual build commands |
46 | quiet_cmd_vdso32ld = VDSO32L $@ | 46 | quiet_cmd_vdso32ld = VDSO32L $@ |
47 | cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@ | 47 | cmd_vdso32ld = $(CROSS32CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) |
48 | quiet_cmd_vdso32as = VDSO32A $@ | 48 | quiet_cmd_vdso32as = VDSO32A $@ |
49 | cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< | 49 | cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< |
50 | 50 | ||
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile index c710802b8fb6..366ae09b14c1 100644 --- a/arch/powerpc/kernel/vdso64/Makefile +++ b/arch/powerpc/kernel/vdso64/Makefile | |||
@@ -23,7 +23,7 @@ CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) | |||
23 | $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so | 23 | $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so |
24 | 24 | ||
25 | # link rule for the .so file, .lds has to be first | 25 | # link rule for the .so file, .lds has to be first |
26 | $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) | 26 | $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) FORCE |
27 | $(call if_changed,vdso64ld) | 27 | $(call if_changed,vdso64ld) |
28 | 28 | ||
29 | # strip rule for the .so file | 29 | # strip rule for the .so file |
@@ -32,12 +32,12 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE | |||
32 | $(call if_changed,objcopy) | 32 | $(call if_changed,objcopy) |
33 | 33 | ||
34 | # assembly rules for the .S files | 34 | # assembly rules for the .S files |
35 | $(obj-vdso64): %.o: %.S | 35 | $(obj-vdso64): %.o: %.S FORCE |
36 | $(call if_changed_dep,vdso64as) | 36 | $(call if_changed_dep,vdso64as) |
37 | 37 | ||
38 | # actual build commands | 38 | # actual build commands |
39 | quiet_cmd_vdso64ld = VDSO64L $@ | 39 | quiet_cmd_vdso64ld = VDSO64L $@ |
40 | cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ | 40 | cmd_vdso64ld = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) |
41 | quiet_cmd_vdso64as = VDSO64A $@ | 41 | quiet_cmd_vdso64as = VDSO64A $@ |
42 | cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< | 42 | cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< |
43 | 43 | ||