* [PATCH][3.x] kernel: syscall: Correctly check for x32
@ 2021-06-11 7:57 Richard Weinberger
2021-06-11 8:31 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2021-06-11 7:57 UTC (permalink / raw)
To: xenomai; +Cc: Richard Weinberger
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 <richard@nod.at>
---
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(-)
diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h b/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h
index aa9936dfd..1626430c1 100644
--- a/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h
+++ b/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][3.x] kernel: syscall: Correctly check for x32
2021-06-11 7:57 [PATCH][3.x] kernel: syscall: Correctly check for x32 Richard Weinberger
@ 2021-06-11 8:31 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2021-06-11 8:31 UTC (permalink / raw)
To: Richard Weinberger, xenomai
On 11.06.21 09:57, Richard Weinberger via Xenomai wrote:
> 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 <richard@nod.at>
> ---
> 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(-)
>
> diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h b/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h
> index aa9936dfd..1626430c1 100644
> --- a/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h
> +++ b/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h
> @@ -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
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-11 8:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 7:57 [PATCH][3.x] kernel: syscall: Correctly check for x32 Richard Weinberger
2021-06-11 8:31 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.