[PATCH v2] arm: Replace ASSEMBLY with ASSEMBLER in uapi

Nick Huang sef1548 at gmail.com
Mon Mar 9 08:24:23 PDT 2026


Add a compatibility shim for __ASSEMBLER__ to support older GCC versions.
This bridge ensures that toolchains defining only __ASSEMBLY__ can correctly identify assembly stages.
This block can be removed once consensus is reached to drop support for these legacy compilers. If this version is acceptable, I will send it out in the v3 patch.

diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
index 8896c23cc..427eb70bd 100644
--- a/arch/arm/include/uapi/asm/ptrace.h
+++ b/arch/arm/include/uapi/asm/ptrace.h
@@ -119,7 +119,11 @@
 #define PT_DATA_ADDR		0x10004
 #define PT_TEXT_END_ADDR	0x10008
 
-#ifndef __ASSEMBLY__
+#if !defined(__ASSEMBLER__) && defined(__ASSEMBLY__)
+#define __ASSEMBLER__ __ASSEMBLY__
+#endif
+
+#ifndef __ASSEMBLER__ 
 
 /*
  * This struct defines the way the registers are stored on the
@@ -158,6 +162,6 @@ struct pt_regs {
 #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )
 
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__  */
 
 #endif /* _UAPI__ASM_ARM_PTRACE_H */
-- 
2.43.0




More information about the linux-arm-kernel mailing list