Skip to contentSkip to conversation

sparc: vdso: Fix build failure seen due to kbuild changes

PATCH In review Guenter Roeck 3 participants 5 messages Nov 11, 2019 – Nov 12, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: vdso: Fix build failure seen due to kbuild changes

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 <[email protected]>
Cc Marc Zyngier <[email protected]>
---
 arch/sparc/vdso/Makefile | 2 ++
 1 file changed, 2 insertions(+)
arch/sparc/vdso/Makefile +2 -0
index 324a23947585..cb72a205cd7e 100644
@@ -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
Signature · 1 line
2.17.1
maintainer Acked-by on v1 1/1
#1 lore raw

From: Guenter Roeck <[email protected]>
Date: Sun, 10 Nov 2019 17:11:06 -0800

Quoted 13 lines

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.

Quoted 4 lines
Fixes a3de7a72c517 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
Cc Masahiro Yamada <[email protected]>
Cc Marc Zyngier <[email protected]>
#2 lore raw
Quoted 17 lines · David Miller

From: Guenter Roeck <[email protected]>
Date: Sun, 10 Nov 2019 17:11:06 -0800

Quoted 13 lines

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.

Quoted 6 lines
Quoted 4 lines
Fixes a3de7a72c517 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")
Cc Masahiro Yamada <[email protected]>
Cc Marc Zyngier <[email protected]>

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)

Signature · 2 lines
Best Regards
Masahiro Yamada
#3 lore raw
Quoted 23 lines · Masahiro Yamada
Quoted 22 lines · David Miller

From: Guenter Roeck <[email protected]>
Date: Sun, 10 Nov 2019 17:11:06 -0800

Quoted 17 lines

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 <[email protected]>
Cc Marc Zyngier <[email protected]>
Quoted 9 lines
Quoted 1 line

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 ?

Quoted 4 lines

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

Same here.

Quoted 4 lines

(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

Reviewed-by
#4 lore raw
Quoted 44 lines · Guenter Roeck
Quoted 23 lines · Masahiro Yamada
Quoted 22 lines · David Miller

From: Guenter Roeck <[email protected]>
Date: Sun, 10 Nov 2019 17:11:06 -0800

Quoted 17 lines

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 <[email protected]>
Cc Marc Zyngier <[email protected]>
Quoted 9 lines
Quoted 1 line

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 ?

Quoted 4 lines

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

Same here.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

(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:

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

Signature · 2 lines
Best Regards
Masahiro Yamada