linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc: vdso: Fix build failure seen due to kbuild changes
@ 2019-11-11  1:11 Guenter Roeck
  2019-11-11  1:32 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2019-11-11  1:11 UTC (permalink / raw)
  To: David S . Miller
  Cc: sparclinux, linux-kernel, linux-kbuild, Guenter Roeck,
	Masahiro Yamada, Marc Zyngier

sparc64:allmodconfig fails to build with the following error.

unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
arch/sparc/vdso/vdso32/vclock_gettime.o: failed
make[2]: *** [arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
make[2]: *** Waiting for unfinished jobs....

The problem bisects to commit a3de7a72c517 ("kbuild: change
*FLAGS_<basetarget>.o to take the path relative to $(obj)").
Duplicate the x86 specific defines from this commit to the sparc
vdso Makefile to fix the problem.

Fixes: a3de7a72c517 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/sparc/vdso/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index 324a23947585..cb72a205cd7e 100644
--- a/arch/sparc/vdso/Makefile
+++ b/arch/sparc/vdso/Makefile
@@ -67,6 +67,7 @@ $(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/vclock_gettime.o = -pg
 
 $(obj)/%.so: OBJCOPYFLAGS := -S
 $(obj)/%.so: $(obj)/%.so.dbg FORCE
@@ -74,6 +75,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
 
 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
 VDSO_LDFLAGS_vdso32.lds = -m elf32_sparc -soname linux-gate.so.1
+VDSO_LDFLAGS_vdso32/vdso32.lds = -m elf32_sparc -soname linux-gate.so.1
 
 #This makes sure the $(obj) subdirectory exists even though vdso32/
 #is not a kbuild sub-make subdirectory
-- 
2.17.1


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

* Re: [PATCH] sparc: vdso: Fix build failure seen due to kbuild changes
  2019-11-11  1:11 [PATCH] sparc: vdso: Fix build failure seen due to kbuild changes Guenter Roeck
@ 2019-11-11  1:32 ` David Miller
  2019-11-11  1:47   ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2019-11-11  1:32 UTC (permalink / raw)
  To: linux; +Cc: sparclinux, linux-kernel, linux-kbuild, yamada.masahiro, maz

From: Guenter Roeck <linux@roeck-us.net>
Date: Sun, 10 Nov 2019 17:11:06 -0800

> sparc64:allmodconfig fails to build with the following error.
> 
> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> make[2]: *** [arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
> make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
> make[2]: *** Waiting for unfinished jobs....
> 
> The problem bisects to commit a3de7a72c517 ("kbuild: change
> *FLAGS_<basetarget>.o to take the path relative to $(obj)").
> Duplicate the x86 specific defines from this commit to the sparc
> vdso Makefile to fix the problem.
> 
> Fixes: a3de7a72c517 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

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

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

* Re: [PATCH] sparc: vdso: Fix build failure seen due to kbuild changes
  2019-11-11  1:32 ` David Miller
@ 2019-11-11  1:47   ` Masahiro Yamada
  2019-11-11 14:35     ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2019-11-11  1:47 UTC (permalink / raw)
  To: David Miller, Guenter Roeck
  Cc: sparclinux, Linux Kernel Mailing List, Linux Kbuild mailing list,
	Marc Zyngier

On Mon, Nov 11, 2019 at 10:32 AM David Miller <davem@davemloft.net> wrote:
>
> From: Guenter Roeck <linux@roeck-us.net>
> Date: Sun, 10 Nov 2019 17:11:06 -0800
>
> > sparc64:allmodconfig fails to build with the following error.
> >
> > unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> > arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> > make[2]: *** [arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
> > make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
> > make[2]: *** Waiting for unfinished jobs....
> >
> > The problem bisects to commit a3de7a72c517 ("kbuild: change
> > *FLAGS_<basetarget>.o to take the path relative to $(obj)").
> > Duplicate the x86 specific defines from this commit to the sparc
> > vdso Makefile to fix the problem.
> >
> > Fixes: a3de7a72c517 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> > Cc: Marc Zyngier <maz@kernel.org>
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>
> Acked-by: David S. Miller <davem@davemloft.net>


Yeah, I had submitted a fix a long time before.

https://lore.kernel.org/patchwork/patch/1130469/

I do not know why it was not picked up.


It is OK whether any patch is picked up
as long as the build error is fixed.


(I think  CFLAGS_REMOVE_vdso32/vdso-note.o
should be added too, though)




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] sparc: vdso: Fix build failure seen due to kbuild changes
  2019-11-11  1:47   ` Masahiro Yamada
@ 2019-11-11 14:35     ` Guenter Roeck
  2019-11-12 12:06       ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2019-11-11 14:35 UTC (permalink / raw)
  To: Masahiro Yamada, David Miller
  Cc: sparclinux, Linux Kernel Mailing List, Linux Kbuild mailing list,
	Marc Zyngier

On 11/10/19 5:47 PM, Masahiro Yamada wrote:
> On Mon, Nov 11, 2019 at 10:32 AM David Miller <davem@davemloft.net> wrote:
>>
>> From: Guenter Roeck <linux@roeck-us.net>
>> Date: Sun, 10 Nov 2019 17:11:06 -0800
>>
>>> sparc64:allmodconfig fails to build with the following error.
>>>
>>> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
>>> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
>>> make[2]: *** [arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
>>> make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
>>> make[2]: *** Waiting for unfinished jobs....
>>>
>>> The problem bisects to commit a3de7a72c517 ("kbuild: change
>>> *FLAGS_<basetarget>.o to take the path relative to $(obj)").
>>> Duplicate the x86 specific defines from this commit to the sparc
>>> vdso Makefile to fix the problem.
>>>
>>> Fixes: a3de7a72c517 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
>>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Cc: Marc Zyngier <maz@kernel.org>
>>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>>
>> Acked-by: David S. Miller <davem@davemloft.net>
> 
> 
> Yeah, I had submitted a fix a long time before.
> 
> https://lore.kernel.org/patchwork/patch/1130469/
> 
> I do not know why it was not picked up.
> 

Why don't you just push it upstream yourself ?

> 
> It is OK whether any patch is picked up
> as long as the build error is fixed.
> 
Same here.

> 
> (I think  CFLAGS_REMOVE_vdso32/vdso-note.o
> should be added too, though)
> 
Hard to decide for someone not involved in vdso development.
It wasn't added for x86, and it compiles without, so I rather
left it alone.

Guenter

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

* Re: [PATCH] sparc: vdso: Fix build failure seen due to kbuild changes
  2019-11-11 14:35     ` Guenter Roeck
@ 2019-11-12 12:06       ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2019-11-12 12:06 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: David Miller, sparclinux, Linux Kernel Mailing List,
	Linux Kbuild mailing list, Marc Zyngier

On Mon, Nov 11, 2019 at 11:35 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 11/10/19 5:47 PM, Masahiro Yamada wrote:
> > On Mon, Nov 11, 2019 at 10:32 AM David Miller <davem@davemloft.net> wrote:
> >>
> >> From: Guenter Roeck <linux@roeck-us.net>
> >> Date: Sun, 10 Nov 2019 17:11:06 -0800
> >>
> >>> sparc64:allmodconfig fails to build with the following error.
> >>>
> >>> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> >>> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> >>> make[2]: *** [arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
> >>> make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
> >>> make[2]: *** Waiting for unfinished jobs....
> >>>
> >>> The problem bisects to commit a3de7a72c517 ("kbuild: change
> >>> *FLAGS_<basetarget>.o to take the path relative to $(obj)").
> >>> Duplicate the x86 specific defines from this commit to the sparc
> >>> vdso Makefile to fix the problem.
> >>>
> >>> Fixes: a3de7a72c517 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
> >>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> >>> Cc: Marc Zyngier <maz@kernel.org>
> >>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> >>
> >> Acked-by: David S. Miller <davem@davemloft.net>
> >
> >
> > Yeah, I had submitted a fix a long time before.
> >
> > https://lore.kernel.org/patchwork/patch/1130469/
> >
> > I do not know why it was not picked up.
> >
>
> Why don't you just push it upstream yourself ?
>
> >
> > It is OK whether any patch is picked up
> > as long as the build error is fixed.
> >
> Same here.
>
> >
> > (I think  CFLAGS_REMOVE_vdso32/vdso-note.o
> > should be added too, though)
> >
> Hard to decide for someone not involved in vdso development.
> It wasn't added for x86, and it compiles without, so I rather
> left it alone.


After looking at the code closer,
I believe your code is more correct.

vdso-note is assembly instead of C.

arch/sparc/vdso/vdso-note.S
arch/sparc/vdso/vdso32/vdso-note.S



The -pg flag is added by the top Makefile,
only for C files.


CFLAGS_REMOVE_vdso-note.o = -pg
was unneeded in the first place.



BTW, I just thought this patch
was supposed to be applied by Dave
since it is touching a single file in arch/sparc/.

If Dave plans to pick up this, please feel free to add:

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>


If I should apply this to kbuild tree, please let me know.



-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2019-11-12 12:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11  1:11 [PATCH] sparc: vdso: Fix build failure seen due to kbuild changes Guenter Roeck
2019-11-11  1:32 ` David Miller
2019-11-11  1:47   ` Masahiro Yamada
2019-11-11 14:35     ` Guenter Roeck
2019-11-12 12:06       ` 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).