Skip to contentSkip to conversation

arch/powerpc/kernel/vdso32/gettimeofday.S:40: Error: syntax error; found `@', expected `,'

PATCH Nick Desaulniers 1 participant 1 message Sep 22, 2020 1 message not in the archive PowerPC

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 15 lines · Segher Boessenkool
Quoted 13 lines · Christophe Leroy

Hi Nick,

Quoted 9 lines · kernel test robot

Hi Michael,

First bad commit (maybe != root cause):

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master

head:   860461e4fcaa76200d2d1a53523e0ff7be92e6e8
commit: 231b232df8f67e7d37af01259c21f2a131c3911e [7032/8629] powerpc/64:

Make VDSO32 track COMPAT on 64-bit

Quoted 3 lines
Quoted 1 line

Definitely not the root cause. That code has been there for years.

Yes, and @local isn't new either.

The first issue is that arch/powerpc/kernel/vdso32/Makefile resets the cflags that we very carefully constructed in the top level Makefile. This is a common issue faced by building the kernel with clang. As such, the flag -no-integrated-as gets dropped, which would have told Clang not to use its integrated assembler and to instead fork out to GNU as. Something like this (but for the 64b VDSO, too) would fix it:

(quoted diff) +0 -0

b/arch/powerpc/kernel/vdso32/Makefile
index 73eada6bc8cd..9aabcbce19cd 100644

arch/powerpc/kernel/vdso32/Makefile +4 -0
@@ -28,6 +28,10 @@ ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
        -Wl,-soname=linux-vdso32.so.1 -Wl,--hash-style=both
 asflags-y := -D__VDSO32__ -s
 
+ifdef CC_IS_CLANG
+ccflags-y += -no-integrated-as
+endif
+
 

Would probably want to gate that on !LLVM_IAS, too, though.

Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

config: powerpc64-randconfig-r035-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project
1321160a26e7e489baf9b10d6de90a342f898960)

A new clang issue ? This code has been there for years and been building with success with GNU tools.

Does the clang integrated assembler handle embedded relocations at all?

I believe so, but each ISA may have different levels of support for all of the different possible relocation types. TBH, I have not yet tested Clang's integrated assembler with PPC. These are to avoid GOT indirection?

Signature · 2 lines
Thanks,
~Nick Desaulniers