Hi Gromero ;) Gustavo Romero <grom...@linux.vnet.ibm.com> writes: > Hi mpe, > > Even after the latest fix for the wild_bctr selftest I'm still getting the > following compilation (actually, an assembling error) because UL is not > understood by the assembler: > > BUILD_TARGET=/home/gromero/git/linux/tools/testing/selftests/powerpc/mm; > mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C mm all > make[1]: Entering directory > '/home/gromero/git/linux/tools/testing/selftests/powerpc/mm' > gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"v4.20-rc1-8-g2c7645b"' > -I/home/gromero/git/linux/tools/testing/selftests/powerpc/include -m64 > wild_bctr.c ../harness.c -o > /home/gromero/git/linux/tools/testing/selftests/powerpc/mm/wild_bctr > /tmp/cctUajlx.s: Assembler messages: > /tmp/cctUajlx.s:270: Error: syntax error; found `U', expected `,' > /tmp/cctUajlx.s:270: Error: junk at end of line: `UL' ... > /tmp/cctUajlx.s:270: Error: syntax error; found `U', expected `,' > /tmp/cctUajlx.s:270: Error: junk at end of line: `UL' > ../../lib.mk:152: recipe for target > '/home/gromero/git/linux/tools/testing/selftests/powerpc/mm/wild_bctr' failed > make[1]: *** > [/home/gromero/git/linux/tools/testing/selftests/powerpc/mm/wild_bctr] Error 1 > make[1]: Target 'all' not remade because of errors. > make[1]: Leaving directory > '/home/gromero/git/linux/tools/testing/selftests/powerpc/mm' > Makefile:39: recipe for target 'mm' failed > make: *** [mm] Error 2 > > For: > git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > (powerpc/fixes) > $ git describe > v4.20-rc1-8-g2c7645b > > This is gcc: > $ gcc --version > gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 > > but it should not make a difference, so I'm wondering if anybody else is > getting the same error too...
It seems to make a difference :) I've been building with Ubuntu 7.3.0-27ubuntu1~18.04 and it builds just fine. It looks like binutils 2.27 doesn't accept ULL but binutils 2.28 does. Ah yep, here: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=86b80085c889cd388fa677a5ae9053fd4be3776c > The following trivial workaround can solve it by forcing a type promotion on > the compiler side whilst leaving the macro taken into the asm code without > the UL string: > > diff --git a/tools/testing/selftests/powerpc/mm/wild_bctr.c > b/tools/testing/selftests/powerpc/mm/wild_bctr.c > index 90469a9..d2772f4 100644 > --- a/tools/testing/selftests/powerpc/mm/wild_bctr.c > +++ b/tools/testing/selftests/powerpc/mm/wild_bctr.c > @@ -47,8 +47,9 @@ static int ok(void) > return 0; > } > > -#define REG_POISON 0x5a5aUL > -#define POISONED_REG(n) ((REG_POISON << 48) | ((n) << 32) | > (REG_POISON << 16) | (n)) > +#define REG_POISON 0x5a5a > +#define POISONED_REG(n) (((REG_POISON+0UL) << 48) | ((n) << 32) | > ((REG_POISON+0UL) << 16) | (n)) > > static inline void poison_regs(void) > { > > > Should I contribute such a fix? Yes thanks. cheers