* [PATCH] arm64: vdso: fix and clean-up Makefile
@ 2019-04-03 8:48 Masahiro Yamada
2019-04-03 12:44 ` Will Deacon
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2019-04-03 8:48 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon
Cc: linux-arm-kernel, Masahiro Yamada, linux-kernel
- $(call if_changed,...) must have FORCE as a prerequisite
- vdso.lds is a generated file, so it should be prefixed with
$(obj)/ instead of $(src)/.
- cmd_vdsosym is a one-liner rule, so the assignment with '='
is simpler.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm64/kernel/vdso/Makefile | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index b801ee5..c9ad9aa 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -31,7 +31,7 @@ CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
$(obj)/vdso.o : $(obj)/vdso.so
# Link rule for the .so file, .lds has to be first
-$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso)
+$(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
$(call if_changed,vdsold)
# Strip rule for the .so file
@@ -42,9 +42,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
# Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@
-define cmd_vdsosym
- $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
-endef
+ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
include/generated/vdso-offsets.h: $(obj)/vdso.so.dbg FORCE
$(call if_changed,vdsosym)
@@ -55,7 +53,7 @@ $(obj-vdso): %.o: %.S FORCE
# Actual build commands
quiet_cmd_vdsold = VDSOL $@
- cmd_vdsold = $(CC) $(c_flags) -Wl,-n -Wl,-T $^ -o $@
+ cmd_vdsold = $(CC) $(c_flags) -Wl,-n -Wl,-T $(real-prereqs) -o $@
quiet_cmd_vdsoas = VDSOA $@
cmd_vdsoas = $(CC) $(a_flags) -c -o $@ $<
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: vdso: fix and clean-up Makefile
2019-04-03 8:48 [PATCH] arm64: vdso: fix and clean-up Makefile Masahiro Yamada
@ 2019-04-03 12:44 ` Will Deacon
2019-04-03 17:04 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2019-04-03 12:44 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Catalin Marinas, linux-arm-kernel, linux-kernel
Hi Masahiro,
On Wed, Apr 03, 2019 at 05:48:22PM +0900, Masahiro Yamada wrote:
> - $(call if_changed,...) must have FORCE as a prerequisite
>
> - vdso.lds is a generated file, so it should be prefixed with
> $(obj)/ instead of $(src)/.
Hmm, this sounds quite alarming! How come out of tree builds seem to work
ok without this patch?
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: vdso: fix and clean-up Makefile
2019-04-03 12:44 ` Will Deacon
@ 2019-04-03 17:04 ` Masahiro Yamada
2019-04-03 17:08 ` Will Deacon
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2019-04-03 17:04 UTC (permalink / raw)
To: Will Deacon; +Cc: Catalin Marinas, linux-arm-kernel, Linux Kernel Mailing List
Hi Will,
On Wed, Apr 3, 2019 at 9:45 PM Will Deacon <will.deacon@arm.com> wrote:
>
> Hi Masahiro,
>
> On Wed, Apr 03, 2019 at 05:48:22PM +0900, Masahiro Yamada wrote:
> > - $(call if_changed,...) must have FORCE as a prerequisite
> >
> > - vdso.lds is a generated file, so it should be prefixed with
> > $(obj)/ instead of $(src)/.
>
> Hmm, this sounds quite alarming! How come out of tree builds seem to work
> ok without this patch?
No, I do not mean like that.
This is just cosmetic (at least for now).
Kbuild conventionally use both $(obj) and $(src), but
they are the same in most places.
If you see the top of scripts/Makefile.build,
$(src) is the same as $(obj).
I fixed this x86 in commit 1742ed2088.
VDSO Makefiles are copied from arch to arch.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: vdso: fix and clean-up Makefile
2019-04-03 17:04 ` Masahiro Yamada
@ 2019-04-03 17:08 ` Will Deacon
0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2019-04-03 17:08 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Catalin Marinas, linux-arm-kernel, Linux Kernel Mailing List
On Thu, Apr 04, 2019 at 02:04:23AM +0900, Masahiro Yamada wrote:
> On Wed, Apr 3, 2019 at 9:45 PM Will Deacon <will.deacon@arm.com> wrote:
> > On Wed, Apr 03, 2019 at 05:48:22PM +0900, Masahiro Yamada wrote:
> > > - $(call if_changed,...) must have FORCE as a prerequisite
> > >
> > > - vdso.lds is a generated file, so it should be prefixed with
> > > $(obj)/ instead of $(src)/.
> >
> > Hmm, this sounds quite alarming! How come out of tree builds seem to work
> > ok without this patch?
>
> No, I do not mean like that.
> This is just cosmetic (at least for now).
> Kbuild conventionally use both $(obj) and $(src), but
> they are the same in most places.
> If you see the top of scripts/Makefile.build,
> $(src) is the same as $(obj).
Ah thanks, that makes much more sense. I'll queue this up for 5.2.
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-03 17:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 8:48 [PATCH] arm64: vdso: fix and clean-up Makefile Masahiro Yamada
2019-04-03 12:44 ` Will Deacon
2019-04-03 17:04 ` Masahiro Yamada
2019-04-03 17:08 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®