[PATCH] powerpc: clean vdso32 and vdso64 directories

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1761d LANDED

Landed in mainline as 964c33cd0be6 on 2021-11-15.

4 messages, 3 authors, 2021-11-17 · open the first message on its own page

[PATCH] powerpc: clean vdso32 and vdso64 directories

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2021-11-09 18:52:14

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")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/powerpc/kernel/Makefile | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0e3640e14eb1..5fa68c2ef1f8 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -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
-- 
2.30.2

Re: [PATCH] powerpc: clean vdso32 and vdso64 directories

From: Christophe Leroy <hidden>
Date: 2021-11-16 15:38:14

Hi Masahiro,

Le 09/11/2021 à 19:50, Masahiro Yamada a écrit :
quoted hunk
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")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

  arch/powerpc/kernel/Makefile | 3 +++
  1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0e3640e14eb1..5fa68c2ef1f8 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -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

Re: [PATCH] powerpc: clean vdso32 and vdso64 directories

From: Michael Ellerman <hidden>
Date: 2021-11-17 11:25:47

On Wed, 10 Nov 2021 03:50:15 +0900, Masahiro Yamada wrote:
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

Re: [PATCH] powerpc: clean vdso32 and vdso64 directories

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2021-11-17 15:00:06

On Wed, Nov 17, 2021 at 12:38 AM Christophe Leroy
[off-list ref] wrote:
Hi Masahiro,

Le 09/11/2021 à 19:50, Masahiro Yamada a écrit :
quoted
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")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

  arch/powerpc/kernel/Makefile | 3 +++
  1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0e3640e14eb1..5fa68c2ef1f8 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -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
Changing the code as follows might work.

$(obj-vdso32): %-32.o: %.S FORCE
          $(call if_changed_dep,vdso32as)




-- 
Best Regards
Masahiro Yamada
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help