Current head x86_64 breakage - csum-copy_64.S
Hi.
Perhaps this is just bad timing but I'm getting:
AS arch/x86/lib/csum-copy_64.oarch/x86/lib/csum-copy_64.S: Assembler messages:arch/x86/lib/csum-copy_64.S:48: Error: Macro `ignore' was already defined
make[1]: *** [arch/x86/lib/csum-copy_64.o] Error 1
make: *** [arch/x86/lib] Error 2
The previous definition appears (brief examination) to be in asm/dwarf2.h.
Regards,
Nigel
Quoted 3 lines
AS
arch/x86/lib/csum-copy_64.oarch/x86/lib/csum-copy_64.S: Assembler messages:arch/x86/lib/csum-copy_64.S:48: Error: Macro `ignore' was already defined
Yes, the culprit seems to be 70f1bba4 ("x86: use ignore macro instead of hash comment"), which introduces the ignore macro in dwarf2.h, which collides with the macro already in csum-copy_64.S.
Perhaps something like the patch below?
---
[PATCH] x86: Rename "ignore" macro in <asm/dwarf2.h> to avoid collision
Commit 70f1bba4 ("x86: use ignore macro instead of hash comment") breaks the 64-bit x86 build on toolchains that have CONFIG_AS_CFI undefined with:
arch/x86/lib/csum-copy_64.S:48: Error: Macro `ignore' was already defined
because <asm/dwarf2.h> now uses the ignore macro name itself. Fix this by changing to __cfi_ignore in dwarf2.h.
---
include/asm-x86/dwarf2.h | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-)
include/asm-x86/dwarf2.h +15 -15
@@ -38,23 +38,23 @@/* Due to the structure of pre-exisiting code, don't use assembler line comment character # to ignore the arguments. Instead, use a dummy macro. */ -.macro ignore a=0, b=0, c=0, d=0 +.macro __cfi_ignore a=0, b=0, c=0, d=0 .endm -#define CFI_STARTPROC ignore -#define CFI_ENDPROC ignore -#define CFI_DEF_CFA ignore -#define CFI_DEF_CFA_REGISTER ignore -#define CFI_DEF_CFA_OFFSET ignore -#define CFI_ADJUST_CFA_OFFSET ignore -#define CFI_OFFSET ignore -#define CFI_REL_OFFSET ignore -#define CFI_REGISTER ignore -#define CFI_RESTORE ignore -#define CFI_REMEMBER_STATE ignore -#define CFI_RESTORE_STATE ignore -#define CFI_UNDEFINED ignore -#define CFI_SIGNAL_FRAME ignore +#define CFI_STARTPROC __cfi_ignore +#define CFI_ENDPROC __cfi_ignore +#define CFI_DEF_CFA __cfi_ignore +#define CFI_DEF_CFA_REGISTER __cfi_ignore +#define CFI_DEF_CFA_OFFSET __cfi_ignore +#define CFI_ADJUST_CFA_OFFSET __cfi_ignore +#define CFI_OFFSET __cfi_ignore +#define CFI_REL_OFFSET __cfi_ignore +#define CFI_REGISTER __cfi_ignore +#define CFI_RESTORE __cfi_ignore +#define CFI_REMEMBER_STATE __cfi_ignore +#define CFI_RESTORE_STATE __cfi_ignore +#define CFI_UNDEFINED __cfi_ignore +#define CFI_SIGNAL_FRAME __cfi_ignore#endif
Quoted 9 lines · Roland Dreier
Quoted 3 lines
AS
arch/x86/lib/csum-copy_64.oarch/x86/lib/csum-copy_64.S: Assembler messages:arch/x86/lib/csum-copy_64.S:48: Error: Macro `ignore' was already definedYes, the culprit seems to be
70f1bba4("x86: use ignore macro instead of hash comment"), which introduces the ignore macro indwarf2.h, which collides with the macro already incsum-copy_64.S.Perhaps something like the patch below?
This fixed the problem for me - compiled, linked & booted just fine.
Thanks!
Alan D. Brunelle