Currently, vdso-image-*.c, vdso*.so, vdso*.so.dbg are not cleaned
because 'make clean' does not include include/config/auto.conf,
resulting in $(vdso_img-y) being empty.
Add the build artifacts to 'targets' unconditionally.
Signed-off-by: Masahiro Yamada <[email protected]>
---
arch/sparc/vdso/Makefile | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index d08c3a0443f3..eb52d0666ffc 100644
--- a/arch/sparc/vdso/Makefile
+++ b/arch/sparc/vdso/Makefile
@@ -24,11 +24,8 @@ targets += vdso.lds $(vobjs-y)
# Build the vDSO image C files and link them in.
vdso_img_objs := $(vdso_img-y:%=vdso-image-%.o)
-vdso_img_cfiles := $(vdso_img-y:%=vdso-image-%.c)
-vdso_img_sodbg := $(vdso_img-y:%=vdso%.so.dbg)
obj-y += $(vdso_img_objs)
-targets += $(vdso_img_cfiles)
-targets += $(vdso_img_sodbg) $(vdso_img-y:%=vdso%.so)
+targets += $(foreach x, 32 64, vdso-image-$(x).c vdso$(x).so vdso$(x).so.dbg)
CPPFLAGS_vdso.lds += -P -C
--
2.40.1
Add objects to obj-y in a more straightforward way.
Signed-off-by: Masahiro Yamada <[email protected]>
---
arch/sparc/vdso/Makefile | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index eb52d0666ffc..03a32b6156ee 100644
--- a/arch/sparc/vdso/Makefile
+++ b/arch/sparc/vdso/Makefile
@@ -3,9 +3,6 @@
# Building vDSO images for sparc.
#
-VDSO64-$(CONFIG_SPARC64) := y
-VDSOCOMPAT-$(CONFIG_COMPAT) := y
-
# files to link into the vdso
vobjs-y := vdso-note.o vclock_gettime.o
@@ -13,18 +10,14 @@ vobjs-y := vdso-note.o vclock_gettime.o
obj-y += vma.o
# vDSO images to build
-vdso_img-$(VDSO64-y) += 64
-vdso_img-$(VDSOCOMPAT-y) += 32
+obj-$(CONFIG_SPARC64) += vdso-image-64.o
+obj-$(CONFIG_COMPAT) += vdso-image-32.o
vobjs := $(foreach F,$(vobjs-y),$(obj)/$F)
$(obj)/vdso.o: $(obj)/vdso.so
targets += vdso.lds $(vobjs-y)
-
-# Build the vDSO image C files and link them in.
-vdso_img_objs := $(vdso_img-y:%=vdso-image-%.o)
-obj-y += $(vdso_img_objs)
targets += $(foreach x, 32 64, vdso-image-$(x).c vdso$(x).so vdso$(x).so.dbg)
CPPFLAGS_vdso.lds += -P -C
--
2.40.1
$(addprefix ) is slightly shorter and more intuitive.
Signed-off-by: Masahiro Yamada <[email protected]>
---
arch/sparc/vdso/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index 03a32b6156ee..7f5eedf1f5e0 100644
--- a/arch/sparc/vdso/Makefile
+++ b/arch/sparc/vdso/Makefile
@@ -13,7 +13,7 @@ obj-y += vma.o
obj-$(CONFIG_SPARC64) += vdso-image-64.o
obj-$(CONFIG_COMPAT) += vdso-image-32.o
-vobjs := $(foreach F,$(vobjs-y),$(obj)/$F)
+vobjs := $(addprefix $(obj)/, $(vobjs-y))
$(obj)/vdso.o: $(obj)/vdso.so
--
2.40.1
Hi Masahiro.
On Sun, Dec 03, 2023 at 07:14:16PM +0900, Masahiro Yamada wrote:
> Currently, vdso-image-*.c, vdso*.so, vdso*.so.dbg are not cleaned
> because 'make clean' does not include include/config/auto.conf,
> resulting in $(vdso_img-y) being empty.
>
> Add the build artifacts to 'targets' unconditionally.
>
> Signed-off-by: Masahiro Yamada <[email protected]>
Nice small fix/clean-ups.
This and the following two patches are:
Acked-by: Sam Ravnborg <[email protected]>
> ---
>
> arch/sparc/vdso/Makefile | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
> index d08c3a0443f3..eb52d0666ffc 100644
> --- a/arch/sparc/vdso/Makefile
> +++ b/arch/sparc/vdso/Makefile
> @@ -24,11 +24,8 @@ targets += vdso.lds $(vobjs-y)
>
> # Build the vDSO image C files and link them in.
> vdso_img_objs := $(vdso_img-y:%=vdso-image-%.o)
> -vdso_img_cfiles := $(vdso_img-y:%=vdso-image-%.c)
> -vdso_img_sodbg := $(vdso_img-y:%=vdso%.so.dbg)
> obj-y += $(vdso_img_objs)
> -targets += $(vdso_img_cfiles)
> -targets += $(vdso_img_sodbg) $(vdso_img-y:%=vdso%.so)
> +targets += $(foreach x, 32 64, vdso-image-$(x).c vdso$(x).so vdso$(x).so.dbg)
>
> CPPFLAGS_vdso.lds += -P -C
>
> --
> 2.40.1
>
On Mon, Dec 4, 2023 at 4:21 AM Sam Ravnborg <[email protected]> wrote:
>
> Hi Masahiro.
>
> On Sun, Dec 03, 2023 at 07:14:16PM +0900, Masahiro Yamada wrote:
> > Currently, vdso-image-*.c, vdso*.so, vdso*.so.dbg are not cleaned
> > because 'make clean' does not include include/config/auto.conf,
> > resulting in $(vdso_img-y) being empty.
> >
> > Add the build artifacts to 'targets' unconditionally.
> >
> > Signed-off-by: Masahiro Yamada <[email protected]>
>
> Nice small fix/clean-ups.
>
> This and the following two patches are:
> Acked-by: Sam Ravnborg <[email protected]>
>
> > ---
> >
Series, applied to linux-kbuild.
--
Best Regards
Masahiro Yamada