RISC-V: Guard alternative asm macros with !LINKER_SCRIPT
PATCH 1/1 RISC-V: Guard alternative asm macros with !LINKER_SCRIPT
Without this I get a handful of .macro related directives that trip up LD.
---
I'm not sure when this started failing, but I recently tried a build on my local machine (with crossdev-based toolchains) and it failed.
--- arch/riscv/include/asm/alternative-macros.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/riscv/include/asm/alternative-macros.h +4 -0
@@ -6,6 +6,8 @@#ifdef __ASSEMBLY__ +#ifndef LINKER_SCRIPT + .macro ALT_ENTRY oldptr newptr vendor_id errata_id new_len .4byte \oldptr - . .4byte \newptr - .
@@ -53,6 +55,8 @@#define __ALTERNATIVE_CFG (...) ALTERNATIVE_CFG __VA_ARGS__#define __ALTERNATIVE_CFG_2 (...) ALTERNATIVE_CFG_2 __VA_ARGS__ +#endif /* LINKER_SCRIPT */ +#else /* !__ASSEMBLY__ */ #include <asm/asm.h>
Signature · 7 lines
2.39.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 7 lines · Palmer Dabbelt
Without this I get a handful of .macro related directives that trip up LD.
Signed-off-by Palmer Dabbelt <[email protected]>---
I'm not sure when this started failing, but I recently tried a build on my local machine (with crossdev-based toolchains) and it failed.
It's actually just because I had https://lore.kernel.org/all/[email protected]/ applied, I'll squash this in if that's OK with folks over there.
Quoted 18 lines
--- arch/riscv/include/asm/alternative-macros.h | 4 ++++ 1 file changed, 4 insertions(+)arch/riscv/include/asm/alternative-macros.h +2
-0@@ -6,6 +6,8 @@#ifdef __ASSEMBLY__ +#ifndef LINKER_SCRIPT + .macro ALT_ENTRY oldptr newptr vendor_id errata_id new_len .4byte \oldptr - . .4byte \newptr - .
arch/riscv/include/asm/alternative-macros.h line 62
Quoted 8 lines
arch/riscv/include/asm/alternative-macros.h +2
-0@@ -53,6 +55,8 @@#define __ALTERNATIVE_CFG (...) ALTERNATIVE_CFG __VA_ARGS__#define __ALTERNATIVE_CFG_2 (...) ALTERNATIVE_CFG_2 __VA_ARGS__ +#endif /* LINKER_SCRIPT */ +#else /* !__ASSEMBLY__ */ #include <asm/asm.h>
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 11 lines · Palmer Dabbelt
Quoted 7 lines · Palmer Dabbelt
Without this I get a handful of .macro related directives that trip up LD.
Signed-off-by Palmer Dabbelt <[email protected]>---
I'm not sure when this started failing, but I recently tried a build on my local machine (with crossdev-based toolchains) and it failed.It's actually just because I had https://lore.kernel.org/all/[email protected]/
applied, I'll squash this in if that's OK with folks over there.
Since I had left on ack on that series, it's fine by me...
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv