parisc: vdso: remove dead code in vdso32/Makefile
PATCH 1/2 parisc: vdso: remove dead code in vdso32/Makefile
This commit removes the unused build rule because 'obj-cvdso32' is not defined.
If you add a C file into arch/parisc/kernel/vdso32/ in the future, you can revert this change. The kernel does not keep code that may or may not be used.
---
arch/parisc/kernel/vdso32/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
arch/parisc/kernel/vdso32/Makefile +1 -6
@@ -26,23 +26,18 @@ $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(obj-cvdso32) $(VDSO_LIBGCC) FORCE +$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso32ld) # assembly rules for the .S files $(obj-vdso32): %.o: %.S FORCE $(call if_changed_dep,vdso32as) -$(obj-cvdso32): %.o: %.c FORCE - $(call if_changed_dep,vdso32cc) - # actual build commands quiet_cmd_vdso32ld = VDSO32L $@ cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $(filter-out FORCE, $^) -o $@ quiet_cmd_vdso32as = VDSO32A $@ cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< -quiet_cmd_vdso32cc = VDSO32C $@ - cmd_vdso32cc = $(CROSS32CC) $(c_flags) -c -fPIC -mno-fast-indirect-calls -o $@ $< # Generate VDSO offsets using helper script gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
Signature · 1 line
2.40.1
PATCH 2/2 parisc: fix vdso Makefiles slightly
vdso32.lds and vdso64.lds are generated files. Prefix them with $(obj)/ instead of $(src)/.
They are generated as prerequisites of others. Add them to 'targets' instead of 'extra-y'.
---
arch/parisc/kernel/vdso32/Makefile | 4 ++-- arch/parisc/kernel/vdso64/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/parisc/kernel/vdso32/Makefile +2 -2
@@ -19,14 +19,14 @@ KBUILD_CFLAGS += -DBUILD_VDSO -DDISABLE_BRANCH_PROFILING VDSO_LIBGCC := $(shell $(CROSS32CC) -print-libgcc-file-name) obj-y += vdso32_wrapper.o -extra-y += vdso32.lds +targets += vdso32.lds CPPFLAGS_vdso32.lds += -P -C # -U$(ARCH) $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE +$(obj)/vdso32.so: $(obj)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso32ld) # assembly rules for the .S files
arch/parisc/kernel/vdso64/Makefile +2 -2
@@ -19,14 +19,14 @@ KBUILD_CFLAGS += -DBUILD_VDSO -DDISABLE_BRANCH_PROFILING VDSO_LIBGCC := $(shell $(CC) -print-libgcc-file-name) obj-y += vdso64_wrapper.o -extra-y += vdso64.lds +targets += vdso64.lds CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE +$(obj)/vdso64.so: $(obj)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso64ld) # assembly rules for the .S files
Signature · 1 line
2.40.1
Re: [PATCH 2/2] parisc: fix vdso Makefiles slightly
Quoted 7 lines · Masahiro Yamada
vdso32.ldsandvdso64.ldsare generated files. Prefix them with $(obj)/ instead of $(src)/.They are generated as prerequisites of others. Add them to 'targets' instead of 'extra-y'.
Signed-off-by Masahiro Yamada <[email protected]>
Helge
Quoted 48 lines
---
arch/parisc/kernel/vdso32/Makefile | 4 ++-- arch/parisc/kernel/vdso64/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)arch/parisc/kernel/vdso32/Makefile +2
-2@@ -19,14 +19,14 @@ KBUILD_CFLAGS += -DBUILD_VDSO -DDISABLE_BRANCH_PROFILING VDSO_LIBGCC := $(shell $(CROSS32CC) -print-libgcc-file-name) obj-y += vdso32_wrapper.o -extra-y += vdso32.lds +targets += vdso32.lds CPPFLAGS_vdso32.lds += -P -C # -U$(ARCH) $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE +$(obj)/vdso32.so: $(obj)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso32ld) # assembly rules for the .S filesarch/parisc/kernel/vdso64/Makefile +2
-2@@ -19,14 +19,14 @@ KBUILD_CFLAGS += -DBUILD_VDSO -DDISABLE_BRANCH_PROFILING VDSO_LIBGCC := $(shell $(CC) -print-libgcc-file-name) obj-y += vdso64_wrapper.o -extra-y += vdso64.lds +targets += vdso64.lds CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE +$(obj)/vdso64.so: $(obj)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso64ld) # assembly rules for the .S files
Quoted 8 lines · Masahiro Yamada
This commit removes the unused build rule because 'obj-cvdso32' is not defined.
If you add a C file into
arch/parisc/kernel/vdso32/in the future, you can revert this change. The kernel does not keep code that may or may not be used.Signed-off-by Masahiro Yamada <[email protected]>
Thank you for those cleanups, Masahiro!
Shall I take your patches via parisc git tree, or will you take them via your git trees?
Helge
Quoted 34 lines
---
arch/parisc/kernel/vdso32/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/parisc/kernel/vdso32/Makefile +1
-6@@ -26,23 +26,18 @@ $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(obj-cvdso32) $(VDSO_LIBGCC) FORCE +$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso32ld) # assembly rules for the .S files $(obj-vdso32): %.o: %.S FORCE $(call if_changed_dep,vdso32as) -$(obj-cvdso32): %.o: %.c FORCE - $(call if_changed_dep,vdso32cc) - # actual build commands quiet_cmd_vdso32ld = VDSO32L $@ cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $(filter-out FORCE, $^) -o $@ quiet_cmd_vdso32as = VDSO32A $@ cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< -quiet_cmd_vdso32cc = VDSO32C $@ - cmd_vdso32cc = $(CROSS32CC) $(c_flags) -c -fPIC -mno-fast-indirect-calls -o $@ $< # Generate VDSO offsets using helper script gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
Quoted 11 lines · Helge Deller
Quoted 8 lines · Masahiro Yamada
This commit removes the unused build rule because 'obj-cvdso32' is not defined.
If you add a C file into
arch/parisc/kernel/vdso32/in the future, you can revert this change. The kernel does not keep code that may or may not be used.Signed-off-by Masahiro Yamada <[email protected]>
Quoted 8 lines
Acked-by Helge Deller <[email protected]>Thank you for those cleanups, Masahiro!
Shall I take your patches via parisc git tree, or will you take them via your git trees?
Helge
Thanks, I applied this to my tree now.
(I need this as a prerequisite for my Kbuild work)
Signature · 2 lines
Best Regards Masahiro Yamada