linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile
@ 2024-03-30 10:08 Masahiro Yamada
  2024-03-30 10:08 ` [PATCH 2/2] parisc: fix vdso Makefiles slightly Masahiro Yamada
  2024-03-30 22:46 ` [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile Helge Deller
  0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2024-03-30 10:08 UTC (permalink / raw)
  To: James E . J . Bottomley, Helge Deller, linux-parisc
  Cc: Masahiro Yamada, linux-kernel

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 <masahiroy@kernel.org>
---

 arch/parisc/kernel/vdso32/Makefile | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/parisc/kernel/vdso32/Makefile b/arch/parisc/kernel/vdso32/Makefile
index 4459a48d2303..e45d46bf46a2 100644
--- a/arch/parisc/kernel/vdso32/Makefile
+++ b/arch/parisc/kernel/vdso32/Makefile
@@ -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
-- 
2.40.1


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

* [PATCH 2/2] parisc: fix vdso Makefiles slightly
  2024-03-30 10:08 [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile Masahiro Yamada
@ 2024-03-30 10:08 ` Masahiro Yamada
  2024-03-30 22:48   ` Helge Deller
  2024-03-30 22:46 ` [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile Helge Deller
  1 sibling, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2024-03-30 10:08 UTC (permalink / raw)
  To: James E . J . Bottomley, Helge Deller, linux-parisc
  Cc: Masahiro Yamada, linux-kernel

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'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/parisc/kernel/vdso32/Makefile | 4 ++--
 arch/parisc/kernel/vdso64/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/parisc/kernel/vdso32/Makefile b/arch/parisc/kernel/vdso32/Makefile
index e45d46bf46a2..f15367f77d49 100644
--- a/arch/parisc/kernel/vdso32/Makefile
+++ b/arch/parisc/kernel/vdso32/Makefile
@@ -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
diff --git a/arch/parisc/kernel/vdso64/Makefile b/arch/parisc/kernel/vdso64/Makefile
index f3d6045793f4..25eb9a95422c 100644
--- a/arch/parisc/kernel/vdso64/Makefile
+++ b/arch/parisc/kernel/vdso64/Makefile
@@ -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
-- 
2.40.1


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

* Re: [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile
  2024-03-30 10:08 [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile Masahiro Yamada
  2024-03-30 10:08 ` [PATCH 2/2] parisc: fix vdso Makefiles slightly Masahiro Yamada
@ 2024-03-30 22:46 ` Helge Deller
  2024-04-16  2:26   ` Masahiro Yamada
  1 sibling, 1 reply; 5+ messages in thread
From: Helge Deller @ 2024-03-30 22:46 UTC (permalink / raw)
  To: Masahiro Yamada, James E . J . Bottomley, linux-parisc; +Cc: linux-kernel

On 3/30/24 11:08, Masahiro Yamada wrote:
> 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 <masahiroy@kernel.org>

Acked-by: Helge Deller <deller@gmx.de>

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


> ---
>
>   arch/parisc/kernel/vdso32/Makefile | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/arch/parisc/kernel/vdso32/Makefile b/arch/parisc/kernel/vdso32/Makefile
> index 4459a48d2303..e45d46bf46a2 100644
> --- a/arch/parisc/kernel/vdso32/Makefile
> +++ b/arch/parisc/kernel/vdso32/Makefile
> @@ -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


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

* Re: [PATCH 2/2] parisc: fix vdso Makefiles slightly
  2024-03-30 10:08 ` [PATCH 2/2] parisc: fix vdso Makefiles slightly Masahiro Yamada
@ 2024-03-30 22:48   ` Helge Deller
  0 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2024-03-30 22:48 UTC (permalink / raw)
  To: Masahiro Yamada, James E . J . Bottomley, linux-parisc; +Cc: linux-kernel

On 3/30/24 11:08, Masahiro Yamada wrote:
> 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'.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Helge Deller <deller@gmx.de>

Helge

> ---
>
>   arch/parisc/kernel/vdso32/Makefile | 4 ++--
>   arch/parisc/kernel/vdso64/Makefile | 4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/parisc/kernel/vdso32/Makefile b/arch/parisc/kernel/vdso32/Makefile
> index e45d46bf46a2..f15367f77d49 100644
> --- a/arch/parisc/kernel/vdso32/Makefile
> +++ b/arch/parisc/kernel/vdso32/Makefile
> @@ -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
> diff --git a/arch/parisc/kernel/vdso64/Makefile b/arch/parisc/kernel/vdso64/Makefile
> index f3d6045793f4..25eb9a95422c 100644
> --- a/arch/parisc/kernel/vdso64/Makefile
> +++ b/arch/parisc/kernel/vdso64/Makefile
> @@ -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


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

* Re: [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile
  2024-03-30 22:46 ` [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile Helge Deller
@ 2024-04-16  2:26   ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2024-04-16  2:26 UTC (permalink / raw)
  To: Helge Deller; +Cc: James E . J . Bottomley, linux-parisc, linux-kernel

On Sun, Mar 31, 2024 at 7:46 AM Helge Deller <deller@gmx.de> wrote:
>
> On 3/30/24 11:08, Masahiro Yamada wrote:
> > 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 <masahiroy@kernel.org>
>
> Acked-by: Helge Deller <deller@gmx.de>
>
> 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)



-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2024-04-16  2:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-30 10:08 [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile Masahiro Yamada
2024-03-30 10:08 ` [PATCH 2/2] parisc: fix vdso Makefiles slightly Masahiro Yamada
2024-03-30 22:48   ` Helge Deller
2024-03-30 22:46 ` [PATCH 1/2] parisc: vdso: remove dead code in vdso32/Makefile Helge Deller
2024-04-16  2:26   ` 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).