diff options
author | Simon Dardis <simon.dardis@imgtec.com> | 2017-09-14 10:36:04 +0000 |
---|---|---|
committer | Simon Dardis <simon.dardis@imgtec.com> | 2017-09-14 10:36:04 +0000 |
commit | a403018d684b206a4a9e20914d3f8ac0660483a6 (patch) | |
tree | ba20935af0bd52dfbcd31a22a9acd78bafda4300 /test | |
parent | 6f6220991eadb35da366497f22d96e98422d11eb (diff) |
[mips] Fix sem_init_glibc test for MIPS.
glibc changed the implementation of semaphores for glibc 2.21 requiring
some target specific changes for this compiler-rt test. Modify the test
to cope with MIPS64 and do some future/correctness work by tying the
define for MIPS64 to exactly the define of __HAVE_64B_ATOMICS in glibc.
Contributions from Nitesh Jain.
Reviewers: eugenis
Differential Revision: https://reviews.llvm.org/D37829
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc b/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc index 523ac9811..5fc9e4639 100644 --- a/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc +++ b/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc @@ -13,9 +13,11 @@ typedef uint64_t semval_t; // This condition needs to correspond to __HAVE_64B_ATOMICS macro in glibc. -#elif (defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \ - defined(__s390x__) || defined(__sparc64__) || defined(__alpha__) || \ - defined(__ia64__) || defined(__m68k__)) && __GLIBC_PREREQ(2, 21) +#elif (defined(__x86_64__) || defined(__aarch64__) || \ + defined(__powerpc64__) || defined(__s390x__) || defined(__sparc64__) || \ + defined(__alpha__) || defined(__ia64__) || defined(__m68k__) || \ + (defined(__mips64) || _MIPS_SIM == _ABI64)) && \ + __GLIBC_PREREQ(2, 21) typedef uint64_t semval_t; #else typedef unsigned semval_t; |