linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* powerpc VDSO files being unnecessarily rebuilt
@ 2020-12-17  2:56 Michael Ellerman
  2020-12-17  9:23 ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2020-12-17  2:56 UTC (permalink / raw)
  To: linuxppc-dev, Masahiro Yamada, Christophe Leroy, linux-kbuild

Hi all,

Since the merge of the C VDSO I see we are repeatedly rebuilding some
files in the VDSO, eg:

  $ make V=2
  make[1]: Entering directory '/home/michael/linux/build~'
    GEN     Makefile
    CALL    /home/michael/linux/scripts/checksyscalls.sh - due to target missing
    CALL    /home/michael/linux/scripts/atomic/check-atomics.sh - due to target missing
    CHK     include/generated/compile.h
    CC      arch/powerpc/kernel/vdso64/vgettimeofday.o - due to vgettimeofday.o not in $(targets)

This then causes multiple other files to be rebuilt.

So the obvious fix is to add it to targets:

diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index d365810a689a..5386532866ce 100644
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
@@ -5,6 +5,7 @@ ARCH_REL_TYPE_ABS := R_PPC_JUMP_SLOT|R_PPC_GLOB_DAT|R_PPC_ADDR32|R_PPC_ADDR24|R_
 include $(srctree)/lib/vdso/Makefile
 
 obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o
+targets := $(obj-vdso64) vdso64.so.dbg
 
 ifneq ($(c-gettimeofday-y),)
   CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
@@ -13,11 +14,11 @@ ifneq ($(c-gettimeofday-y),)
   CFLAGS_vgettimeofday.o += -DDISABLE_BRANCH_PROFILING
   CFLAGS_vgettimeofday.o += -ffreestanding -fasynchronous-unwind-tables
   CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
+  targets += vgettimeofday.o
 endif
 
 # Build rules
 
-targets := $(obj-vdso64) vdso64.so.dbg
 obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
 
 GCOV_PROFILE := n


But then I see it still rebuilt:

  CC      arch/powerpc/kernel/vdso64/vgettimeofday.o - due to command line change


I'm not changing the command line, and AFAICS the .cmd file is not
changing either:

  $ make V=2
  ...
    CC      arch/powerpc/kernel/vdso64/vgettimeofday.o - due to command line change
  
  $ sha256sum build\~/arch/powerpc/kernel/vdso64/vgettimeofday.o
  7f635546bc2768c7b929d3de1724d83285f3cd54394fcd7104f8b1301d689d65  build~/arch/powerpc/kernel/vdso64/vgettimeofday.o
  
  $ make V=2
  ...
    CC      arch/powerpc/kernel/vdso64/vgettimeofday.o - due to command line change
  
  $ sha256sum build\~/arch/powerpc/kernel/vdso64/vgettimeofday.o
  7f635546bc2768c7b929d3de1724d83285f3cd54394fcd7104f8b1301d689d65  build~/arch/powerpc/kernel/vdso64/vgettimeofday.o


So any hints on what I'm missing here?

cheers

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-17 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-17  2:56 powerpc VDSO files being unnecessarily rebuilt Michael Ellerman
2020-12-17  9:23 ` Masahiro Yamada
2020-12-17 16:40   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).