Re: Build breakage caused by the use of UDB

From: Peter Zijlstra
Date: Thu Dec 18 2025 - 03:57:47 EST


On Wed, Dec 17, 2025 at 03:39:07PM +0100, Uros Bizjak wrote:

> > > What's worse, it only sometimes does this:
> > >
> > > $ grep ".byte[ ]*0x0f" defconfig-build/drivers/net/wireless/realtek/rtlwifi/base.s
> > > 1: .byte0x0f,0x0b ;
> > > 1: .byte 0x0f,0x0b ;
> > >
> > > W.T.F. and all that.

> How about the attached patch that ensures that separator survives
> macro expansion?

Right, I think I tried that, it doesn't like things like retpoline.S

> diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h
> index 0e8c611bc9e2..76d2eb96dd49 100644
> --- a/arch/x86/include/asm/asm.h
> +++ b/arch/x86/include/asm/asm.h
> @@ -17,7 +17,7 @@
> # define __ASM_REGPFX %%
> #endif
>
> -#define _ASM_BYTES(x, ...) __ASM_FORM(.byte x,##__VA_ARGS__ ;)
> +#define _ASM_BYTES(x, ...) __ASM_FORM(.byte\t x,##__VA_ARGS__)
>
> #ifndef __x86_64__
> /* 32 bit */

$ make O=defconfig-build/ CC=gcc-8 arch/x86/lib/retpoline.o
make[1]: Entering directory '/mnt/nvme/linux-2.6/defconfig-build'
GEN Makefile
CALL ../scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
AS arch/x86/lib/retpoline.o
../arch/x86/include/asm/GEN-for-each-reg.h: Assembler messages:
../arch/x86/include/asm/GEN-for-each-reg.h:140: Error: bad expression
../arch/x86/include/asm/GEN-for-each-reg.h:6: Info: macro invoked from here
../arch/x86/include/asm/GEN-for-each-reg.h:140: Error: junk at end of line, first unrecognized character is `t'

Which is why I ended up splitting the definition :/