diff options
| author | Bill Seurer <seurer@linux.vnet.ibm.com> | 2017-05-25 14:32:22 +0000 |
|---|---|---|
| committer | Bill Seurer <seurer@linux.vnet.ibm.com> | 2017-05-25 14:32:22 +0000 |
| commit | 37c9be93930aeeb589255e7ea455a7fef0503757 (patch) | |
| tree | a843c9c977b3cc5b2d699133b44557525d367f61 | |
| parent | 5b7c98e52aad91e3fca70a94575693b0ad2d4e96 (diff) | |
| download | bcm5719-llvm-37c9be93930aeeb589255e7ea455a7fef0503757.tar.gz bcm5719-llvm-37c9be93930aeeb589255e7ea455a7fef0503757.zip | |
[PowerPC] Fix test case sem_init_glibc.cc for powerpc64be
This test case fails on powerpc64be with older glibcs because of the glibc
version test.
llvm-svn: 303863
| -rw-r--r-- | compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc b/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc index 92557b7592c..b7e8721a1b9 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc @@ -8,8 +8,12 @@ #include <string.h> #include <stdint.h> +// On powerpc64be semval_t must be 64 bits even with "old" versions of glibc. +#if __PPC64__ && __BIG_ENDIAN__ +typedef uint64_t semval_t; + // This condition needs to correspond to __HAVE_64B_ATOMICS macro in glibc. -#if (defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \ +#elif (defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \ defined(__s390x__) || defined(__sparc64__) || defined(__alpha__) || \ defined(__ia64__) || defined(__m68k__)) && __GLIBC_PREREQ(2, 21) typedef uint64_t semval_t; |

