linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc: vdso: fix build error of vdso32
@ 2019-09-22 11:34 Masahiro Yamada
  2019-09-27 15:46 ` Masahiro Yamada
  2019-11-13 23:59 ` Kees Cook
  0 siblings, 2 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-09-22 11:34 UTC (permalink / raw)
  To: David S . Miller, sparclinux
  Cc: Anatoly Pugachev, Masahiro Yamada, Greg Kroah-Hartman,
	Thomas Gleixner, linux-kernel, ndesaulniers

Since commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to
take the path relative to $(obj)"), sparc allmodconfig fails to build
as follows:

  CC      arch/sparc/vdso/vdso32/vclock_gettime.o
unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
arch/sparc/vdso/vdso32/vclock_gettime.o: failed

The cause of the breakage is that -pg flag not being dropped.

The vdso32 files are located in the vdso32/ subdirectory, but I missed
to update the Makefile.

Fixes: 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/sparc/vdso/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index 324a23947585..399bc22b1cf8 100644
--- a/arch/sparc/vdso/Makefile
+++ b/arch/sparc/vdso/Makefile
@@ -67,12 +67,14 @@ $(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS) $(SPARC_REG_CFLAGS
 #
 CFLAGS_REMOVE_vdso-note.o = -pg
 CFLAGS_REMOVE_vclock_gettime.o = -pg
+CFLAGS_REMOVE_vdso32/vdso-note.o = -pg
+CFLAGS_REMOVE_vdso32/vclock_gettime.o = -pg
 
 $(obj)/%.so: OBJCOPYFLAGS := -S
 $(obj)/%.so: $(obj)/%.so.dbg FORCE
 	$(call if_changed,objcopy)
 
-CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
+CPPFLAGS_vdso32/vdso32.lds = $(CPPFLAGS_vdso.lds)
 VDSO_LDFLAGS_vdso32.lds = -m elf32_sparc -soname linux-gate.so.1
 
 #This makes sure the $(obj) subdirectory exists even though vdso32/
-- 
2.17.1


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

* Re: [PATCH] sparc: vdso: fix build error of vdso32
  2019-09-22 11:34 [PATCH] sparc: vdso: fix build error of vdso32 Masahiro Yamada
@ 2019-09-27 15:46 ` Masahiro Yamada
  2019-10-18  8:27   ` Anatoly Pugachev
  2019-11-13 23:59 ` Kees Cook
  1 sibling, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2019-09-27 15:46 UTC (permalink / raw)
  To: David S . Miller, sparclinux
  Cc: Anatoly Pugachev, Greg Kroah-Hartman, Thomas Gleixner,
	Linux Kernel Mailing List, ndesaulniers

On Sun, Sep 22, 2019 at 8:36 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Since commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to
> take the path relative to $(obj)"), sparc allmodconfig fails to build
> as follows:
>
>   CC      arch/sparc/vdso/vdso32/vclock_gettime.o
> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
>
> The cause of the breakage is that -pg flag not being dropped.
>
> The vdso32 files are located in the vdso32/ subdirectory, but I missed
> to update the Makefile.
>
> Fixes: 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
> Reported-by: Anatoly Pugachev <matorola@gmail.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>


I am copy-pasting Tested-by from the reporter:

Tested-by: Anatoly Pugachev <matorola@gmail.com>

It was given here:

https://lkml.org/lkml/2019/9/25/197




>  arch/sparc/vdso/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
> index 324a23947585..399bc22b1cf8 100644
> --- a/arch/sparc/vdso/Makefile
> +++ b/arch/sparc/vdso/Makefile
> @@ -67,12 +67,14 @@ $(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS) $(SPARC_REG_CFLAGS
>  #
>  CFLAGS_REMOVE_vdso-note.o = -pg
>  CFLAGS_REMOVE_vclock_gettime.o = -pg
> +CFLAGS_REMOVE_vdso32/vdso-note.o = -pg
> +CFLAGS_REMOVE_vdso32/vclock_gettime.o = -pg
>
>  $(obj)/%.so: OBJCOPYFLAGS := -S
>  $(obj)/%.so: $(obj)/%.so.dbg FORCE
>         $(call if_changed,objcopy)
>
> -CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
> +CPPFLAGS_vdso32/vdso32.lds = $(CPPFLAGS_vdso.lds)
>  VDSO_LDFLAGS_vdso32.lds = -m elf32_sparc -soname linux-gate.so.1
>
>  #This makes sure the $(obj) subdirectory exists even though vdso32/
> --
> 2.17.1
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] sparc: vdso: fix build error of vdso32
  2019-09-27 15:46 ` Masahiro Yamada
@ 2019-10-18  8:27   ` Anatoly Pugachev
  0 siblings, 0 replies; 6+ messages in thread
From: Anatoly Pugachev @ 2019-10-18  8:27 UTC (permalink / raw)
  To: sparclinux
  Cc: David S . Miller, Greg Kroah-Hartman, Thomas Gleixner,
	Linux Kernel Mailing List, ndesaulniers, Masahiro Yamada

On Fri, Sep 27, 2019 at 6:47 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> On Sun, Sep 22, 2019 at 8:36 PM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> >
> > Since commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to
> > take the path relative to $(obj)"), sparc allmodconfig fails to build
> > as follows:
> >
> >   CC      arch/sparc/vdso/vdso32/vclock_gettime.o
> > unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> > arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> >
> > The cause of the breakage is that -pg flag not being dropped.
> >
> > The vdso32 files are located in the vdso32/ subdirectory, but I missed
> > to update the Makefile.
> >
> > Fixes: 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
> > Reported-by: Anatoly Pugachev <matorola@gmail.com>
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
>
>
> I am copy-pasting Tested-by from the reporter:
>
> Tested-by: Anatoly Pugachev <matorola@gmail.com>
>
> It was given here:
>
> https://lkml.org/lkml/2019/9/25/197
>
>
>
>
> >  arch/sparc/vdso/Makefile | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
> > index 324a23947585..399bc22b1cf8 100644
> > --- a/arch/sparc/vdso/Makefile
> > +++ b/arch/sparc/vdso/Makefile
> > @@ -67,12 +67,14 @@ $(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS) $(SPARC_REG_CFLAGS
> >  #
> >  CFLAGS_REMOVE_vdso-note.o = -pg
> >  CFLAGS_REMOVE_vclock_gettime.o = -pg
> > +CFLAGS_REMOVE_vdso32/vdso-note.o = -pg
> > +CFLAGS_REMOVE_vdso32/vclock_gettime.o = -pg
> >
> >  $(obj)/%.so: OBJCOPYFLAGS := -S
> >  $(obj)/%.so: $(obj)/%.so.dbg FORCE
> >         $(call if_changed,objcopy)
> >
> > -CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
> > +CPPFLAGS_vdso32/vdso32.lds = $(CPPFLAGS_vdso.lds)
> >  VDSO_LDFLAGS_vdso32.lds = -m elf32_sparc -soname linux-gate.so.1
> >
> >  #This makes sure the $(obj) subdirectory exists even though vdso32/


Hello!

Can someone please pull/apply this to master ?!

Thanks!

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

* Re: [PATCH] sparc: vdso: fix build error of vdso32
  2019-09-22 11:34 [PATCH] sparc: vdso: fix build error of vdso32 Masahiro Yamada
  2019-09-27 15:46 ` Masahiro Yamada
@ 2019-11-13 23:59 ` Kees Cook
  2019-11-14  0:21   ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Kees Cook @ 2019-11-13 23:59 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David S . Miller, sparclinux, Anatoly Pugachev,
	Greg Kroah-Hartman, Thomas Gleixner, linux-kernel, ndesaulniers

On Sun, Sep 22, 2019 at 08:34:36PM +0900, Masahiro Yamada wrote:
> Since commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to
> take the path relative to $(obj)"), sparc allmodconfig fails to build
> as follows:
> 
>   CC      arch/sparc/vdso/vdso32/vclock_gettime.o
> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> 
> The cause of the breakage is that -pg flag not being dropped.
> 
> The vdso32 files are located in the vdso32/ subdirectory, but I missed
> to update the Makefile.
> 
> Fixes: 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
> Reported-by: Anatoly Pugachev <matorola@gmail.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

I've tripped over this as well. Since no one has picked this up, can you
take it via your tree Masahiro?

Thanks!

-Kees

> ---
> 
>  arch/sparc/vdso/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
> index 324a23947585..399bc22b1cf8 100644
> --- a/arch/sparc/vdso/Makefile
> +++ b/arch/sparc/vdso/Makefile
> @@ -67,12 +67,14 @@ $(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS) $(SPARC_REG_CFLAGS
>  #
>  CFLAGS_REMOVE_vdso-note.o = -pg
>  CFLAGS_REMOVE_vclock_gettime.o = -pg
> +CFLAGS_REMOVE_vdso32/vdso-note.o = -pg
> +CFLAGS_REMOVE_vdso32/vclock_gettime.o = -pg
>  
>  $(obj)/%.so: OBJCOPYFLAGS := -S
>  $(obj)/%.so: $(obj)/%.so.dbg FORCE
>  	$(call if_changed,objcopy)
>  
> -CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
> +CPPFLAGS_vdso32/vdso32.lds = $(CPPFLAGS_vdso.lds)
>  VDSO_LDFLAGS_vdso32.lds = -m elf32_sparc -soname linux-gate.so.1
>  
>  #This makes sure the $(obj) subdirectory exists even though vdso32/
> -- 
> 2.17.1
> 

-- 
Kees Cook

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

* Re: [PATCH] sparc: vdso: fix build error of vdso32
  2019-11-13 23:59 ` Kees Cook
@ 2019-11-14  0:21   ` David Miller
  2019-11-14 15:08     ` Masahiro Yamada
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2019-11-14  0:21 UTC (permalink / raw)
  To: keescook
  Cc: yamada.masahiro, sparclinux, matorola, gregkh, tglx,
	linux-kernel, ndesaulniers

From: Kees Cook <keescook@chromium.org>
Date: Wed, 13 Nov 2019 15:59:27 -0800

> On Sun, Sep 22, 2019 at 08:34:36PM +0900, Masahiro Yamada wrote:
>> Since commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to
>> take the path relative to $(obj)"), sparc allmodconfig fails to build
>> as follows:
>> 
>>   CC      arch/sparc/vdso/vdso32/vclock_gettime.o
>> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
>> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
>> 
>> The cause of the breakage is that -pg flag not being dropped.
>> 
>> The vdso32 files are located in the vdso32/ subdirectory, but I missed
>> to update the Makefile.
>> 
>> Fixes: 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
>> Reported-by: Anatoly Pugachev <matorola@gmail.com>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> 
> I've tripped over this as well. Since no one has picked this up, can you
> take it via your tree Masahiro?

Yes, please do.  Sorry, I haven't had a lot of time for Sparc work lately.

Acked-by: David S. Miller <davem@davemloft.net>

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

* Re: [PATCH] sparc: vdso: fix build error of vdso32
  2019-11-14  0:21   ` David Miller
@ 2019-11-14 15:08     ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-11-14 15:08 UTC (permalink / raw)
  To: David Miller
  Cc: Kees Cook, sparclinux, Anatoly Pugachev, Greg Kroah-Hartman,
	Thomas Gleixner, Linux Kernel Mailing List, Nick Desaulniers

On Thu, Nov 14, 2019 at 9:22 AM David Miller <davem@davemloft.net> wrote:
>
> From: Kees Cook <keescook@chromium.org>
> Date: Wed, 13 Nov 2019 15:59:27 -0800
>
> > On Sun, Sep 22, 2019 at 08:34:36PM +0900, Masahiro Yamada wrote:
> >> Since commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to
> >> take the path relative to $(obj)"), sparc allmodconfig fails to build
> >> as follows:
> >>
> >>   CC      arch/sparc/vdso/vdso32/vclock_gettime.o
> >> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> >> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> >>
> >> The cause of the breakage is that -pg flag not being dropped.
> >>
> >> The vdso32 files are located in the vdso32/ subdirectory, but I missed
> >> to update the Makefile.
> >>
> >> Fixes: 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
> >> Reported-by: Anatoly Pugachev <matorola@gmail.com>
> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >
> > I've tripped over this as well. Since no one has picked this up, can you
> > take it via your tree Masahiro?
>
> Yes, please do.  Sorry, I haven't had a lot of time for Sparc work lately.
>
> Acked-by: David S. Miller <davem@davemloft.net>


Applied to linux-kbuild.

-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2019-11-14 15:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-22 11:34 [PATCH] sparc: vdso: fix build error of vdso32 Masahiro Yamada
2019-09-27 15:46 ` Masahiro Yamada
2019-10-18  8:27   ` Anatoly Pugachev
2019-11-13 23:59 ` Kees Cook
2019-11-14  0:21   ` David Miller
2019-11-14 15:08     ` 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).