Skip to content

Commit

Permalink
fix(libspl): fixed that failed to create cstor pool on aarch64
Browse files Browse the repository at this point in the history
when __aarch64__ is defined, the file sys_defs.h should not define __arm__, otherwise it will cause a logical error in the file libaio.h. After modification, we successfully run on Huawei ARMv8 Kunpeng920 CPU.

Signed-off-by: jjjighg <tangdongyuan@huawei.com>
  • Loading branch information
jjjighg authored and pawanpraka1 committed Nov 15, 2019
1 parent 6fd2f00 commit 73d2a7c
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions lib/libspl/include/sys/isa_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,41 @@ extern "C" {

#define _SUNOS_VTOC_16

/* arm arch specific defines */
#elif defined(__arm) || defined(__arm__) || defined(__aarch64__)
/* aarch64 arch specific defines */
#elif defined(__aarch64__)

#if !defined(__arm)
#define __arm
#endif

#if !defined(__arm__)
#define __arm__
#endif

#if defined(__aarch64__)
#if !defined(_LP64)
#define _LP64
#endif

#if defined(__AARCH64EL__)
#define _LITTLE_ENDIAN
#else
#define _BIG_ENDIAN
#endif

#define _SUNOS_VTOC_16

/* aarch32 arch specific defines */
#elif defined(__arm) || defined(__arm__)

#if !defined(__arm)
#define __arm
#endif

#if !defined(__arm__)
#define __arm__
#endif

#if !defined(_ILP32)
#define _ILP32
#endif
#endif

#if defined(__ARMEL__) || defined(__AARCH64EL__)
#if defined(__ARMEL__)
#define _LITTLE_ENDIAN
#else
#define _BIG_ENDIAN
Expand Down

0 comments on commit 73d2a7c

Please sign in to comment.