kernel: syscall: Correctly check for x32
PATCH 1/1 kernel: syscall: Correctly check for x32
Since 10.2 gcc it sets __ILP32__ even for i386.
To check for x32 we need to check for __x86_64__ being set too.
Signed-off-by Richard Weinberger <[email protected]>
---
While x32 is gone in master, 3.x stable still has it. Without this patch it is not possible to build Xenomai for i386 with a recent gcc toolchain.
--- kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h +1 -1
@@ -18,7 +18,7 @@#ifndef _COBALT_X86_ASM_UAPI_SYSCALL_H#define _COBALT_X86_ASM_UAPI_SYSCALL_H -#ifdef __ILP32__ +#if defined(__x86_64__) && defined(__ILP32__)#define __xn_syscall_base __COBALT_X32_BASE#else #define __xn_syscall_base 0
Signature · 1 line
2.17.1
Jan Kiszka
AppliedQuoted 18 lines · Richard Weinberger via Xenomai
Since 10.2 gcc it sets
__ILP32__even for i386.
To check for x32 we need to check for__x86_64__being set too.Signed-off-by Richard Weinberger <[email protected]>---
While x32 is gone in master, 3.x stable still has it. Without this patch it is not possible to build Xenomai for i386 with a recent gcc toolchain.--- kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h +0
-0
kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h line 24
Quoted 8 lines
kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h +1
-1@@ -18,7 +18,7 @@#ifndef _COBALT_X86_ASM_UAPI_SYSCALL_H#define _COBALT_X86_ASM_UAPI_SYSCALL_H -#ifdef __ILP32__ +#if defined(__x86_64__) && defined(__ILP32__)#define __xn_syscall_base __COBALT_X32_BASE#else #define __xn_syscall_base 0
Thanks, applied to stable/v3.1.x. No one should be doing gcc-10 with v3.0.x anymore...
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux