Skip to contentSkip to conversation

powerpc: clean vdso32 and vdso64 directories

PATCH Applied Masahiro Yamada 3 participants 4 messages Nov 9, 2021 – Nov 17, 2021 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: clean vdso32 and vdso64 directories

Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the arch/powerpc/kernel/{vdso32,vdso64} directories.

Use the subdir- trick to let "make clean" descend into them.

Fixes bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o")

---

 arch/powerpc/kernel/Makefile | 3 +++
 1 file changed, 3 insertions(+)
arch/powerpc/kernel/Makefile +3 -0
index 0e3640e14eb1..5fa68c2ef1f8 100644
@@ -196,3 +196,6 @@ clean-files := vmlinux.lds
 # Force dependency (incbin is bad)
 $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
 $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
+
+# for cleaning
+subdir- += vdso32 vdso64
Signature · 1 line
2.30.2
#1 lore raw

Hi Masahiro,

Le 09/11/2021 à 19:50, Masahiro Yamada a écrit :

Quoted 19 lines

Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the arch/powerpc/kernel/{vdso32,vdso64} directories.

Use the subdir- trick to let "make clean" descend into them.

Fixes bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o")

---

  arch/powerpc/kernel/Makefile | 3 +++
  1 file changed, 3 insertions(+)
arch/powerpc/kernel/Makefile +0 -0
index 0e3640e14eb1..5fa68c2ef1f8 100644

arch/powerpc/kernel/Makefile clean-files := vmlinux.lds · line 201

Quoted 6 lines
arch/powerpc/kernel/Makefile +3 -0
@@ -196,3 +196,6 @@ clean-files := vmlinux.lds
  # Force dependency (incbin is bad)
  $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
  $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
+
+# for cleaning
+subdir- += vdso32 vdso64

This patch make me think about one thing I would have liked to do, but I don't know Makefiles well enough to be able to do it. You could probably help me with it.

vdso32 and vdso64 contain a lot of redundant sources. I would like to merge them into a new single directory, let say 'vdso', and use the files in that directory to build both vdso32.so and vdso64.so. I have a feeling that x86 is doing it that way, but I've not been able to figure out how to build two objects using the same C/S files.

Thanks
Christophe

#3 lore raw
In reply to Masahiro Yamada
Quoted 8 lines · Masahiro Yamada

Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the arch/powerpc/kernel/{vdso32,vdso64} directories.

Use the subdir- trick to let "make clean" descend into them.

[...]

Applied to powerpc/fixes.

[1/1] powerpc: clean vdso32 and vdso64 directories

      https://git.kernel.org/powerpc/c/964c33cd0be621b291b5d253d8731eb2680082cb

cheers

#2 lore raw
In reply to Christophe Leroy
Quoted 34 lines · Christophe Leroy

Hi Masahiro,

Quoted 19 lines · Masahiro Yamada

Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the arch/powerpc/kernel/{vdso32,vdso64} directories.

Use the subdir- trick to let "make clean" descend into them.

Fixes bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o")

---

  arch/powerpc/kernel/Makefile | 3 +++
  1 file changed, 3 insertions(+)
arch/powerpc/kernel/Makefile +0 -0
index 0e3640e14eb1..5fa68c2ef1f8 100644

arch/powerpc/kernel/Makefile clean-files := vmlinux.lds · line 201

Quoted 6 lines
arch/powerpc/kernel/Makefile +3 -0
@@ -196,3 +196,6 @@ clean-files := vmlinux.lds
  # Force dependency (incbin is bad)
  $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
  $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
+
+# for cleaning
+subdir- += vdso32 vdso64

This patch make me think about one thing I would have liked to do, but I don't know Makefiles well enough to be able to do it. You could probably help me with it.

Quoted 8 lines

vdso32 and vdso64 contain a lot of redundant sources. I would like to merge them into a new single directory, let say 'vdso', and use the files in that directory to build both vdso32.so and vdso64.so. I have a feeling that x86 is doing it that way, but I've not been able to figure out how to build two objects using the same C/S files.

Thanks
Christophe

Changing the code as follows might work.

$(obj-vdso32): %-32.o: %.S FORCE

          $(call if_changed_dep,vdso32as)
Signature · 2 lines
Best Regards
Masahiro Yamada