diff options
author | наб <[email protected]> | 2020-05-18 00:00:49 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-05-28 10:28:20 -0700 |
commit | 6059f3a1f6950bd2aa9724ab917f2bc01343a076 (patch) | |
tree | f1837a0f770fcd7e70586327fd70eca3d7414dd0 | |
parent | 50ff632787876494ca4138ad3a178e97dbf9c0a5 (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
-rw-r--r-- | include/os/linux/spl/sys/isa_defs.h | 6 | ||||
-rw-r--r-- | lib/libspl/include/sys/isa_defs.h | 6 |
2 files changed, 10 insertions, 2 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 diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h index 18a41fef9..4d2d909f3 100644 --- a/lib/libspl/include/sys/isa_defs.h +++ b/lib/libspl/include/sys/isa_defs.h @@ -46,9 +46,13 @@ extern "C" { #define __x86 #endif +#if defined(_ILP32) +/* x32-specific defines; careful to *not* define _LP64 here */ +#else #if !defined(_LP64) #define _LP64 #endif +#endif #if !defined(_LITTLE_ENDIAN) #define _LITTLE_ENDIAN @@ -214,7 +218,7 @@ extern "C" { #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 |