aboutsummaryrefslogtreecommitdiff
path: root/meta-aarch64/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ARM64-UAPI-Set-the-correct-__BITS_PER_LONG-for-ILP32.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-aarch64/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ARM64-UAPI-Set-the-correct-__BITS_PER_LONG-for-ILP32.patch')
-rw-r--r--meta-aarch64/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ARM64-UAPI-Set-the-correct-__BITS_PER_LONG-for-ILP32.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-aarch64/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ARM64-UAPI-Set-the-correct-__BITS_PER_LONG-for-ILP32.patch b/meta-aarch64/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ARM64-UAPI-Set-the-correct-__BITS_PER_LONG-for-ILP32.patch
new file mode 100644
index 00000000..2fb9d760
--- /dev/null
+++ b/meta-aarch64/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ARM64-UAPI-Set-the-correct-__BITS_PER_LONG-for-ILP32.patch
@@ -0,0 +1,35 @@
+From 77cac67f6e71bfe42253aaf674d5a49e17a5812e Mon Sep 17 00:00:00 2001
+From: Andrew Pinski <apinski@cavium.com>
+Date: Wed, 3 Sep 2014 14:18:59 -0700
+Subject: [PATCH 05/25] ARM64:UAPI: Set the correct __BITS_PER_LONG for ILP32
+
+We need to say to the userland API that bits per long is 32bits for ILP32.
+
+Signed-off-by: Andrew Pinski <apinski@cavium.com>
+---
+ arch/arm64/include/uapi/asm/bitsperlong.h | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm64/include/uapi/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h
+index fce9c29..bb716d0 100644
+--- a/arch/arm64/include/uapi/asm/bitsperlong.h
++++ b/arch/arm64/include/uapi/asm/bitsperlong.h
+@@ -16,7 +16,14 @@
+ #ifndef __ASM_BITSPERLONG_H
+ #define __ASM_BITSPERLONG_H
+
+-#define __BITS_PER_LONG 64
++/* Assuming __LP64__ will be defined for native ELF64's and not for ILP32. */
++#ifdef __LP64__
++# define __BITS_PER_LONG 64
++#elif defined(__ILP32__)
++# define __BITS_PER_LONG 32
++#else
++# error "Unknown ABI; not ILP32 or LP64"
++#endif
+
+ #include <asm-generic/bitsperlong.h>
+
+--
+1.9.3
+