aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/linux/spl
diff options
context:
space:
mode:
authorнаб <[email protected]>2020-05-18 00:00:49 +0200
committerBrian Behlendorf <[email protected]>2020-05-28 10:28:20 -0700
commit6059f3a1f6950bd2aa9724ab917f2bc01343a076 (patch)
treef1837a0f770fcd7e70586327fd70eca3d7414dd0 /include/os/linux/spl
parent50ff632787876494ca4138ad3a178e97dbf9c0a5 (diff)
Correctly handle the x32 ABI
__x86_64__ && _ILP32 => don't forcibly define _LP64 Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #10357 Closes #844
Diffstat (limited to 'include/os/linux/spl')
-rw-r--r--include/os/linux/spl/sys/isa_defs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/os/linux/spl/sys/isa_defs.h b/include/os/linux/spl/sys/isa_defs.h
index e36afef31..c19943b85 100644
--- a/include/os/linux/spl/sys/isa_defs.h
+++ b/include/os/linux/spl/sys/isa_defs.h
@@ -40,9 +40,13 @@
#define __x86
#endif
+#if defined(_ILP32)
+/* x32-specific defines; careful to *not* define _LP64 here */
+#else
#if !defined(_LP64)
#define _LP64
#endif
+#endif
#define _ALIGNMENT_REQUIRED 1
@@ -216,7 +220,7 @@
#else
/*
* Currently supported:
- * x86_64, i386, arm, powerpc, s390, sparc, mips, and RV64G
+ * x86_64, x32, i386, arm, powerpc, s390, sparc, mips, and RV64G
*/
#error "Unsupported ISA type"
#endif