From 87e0464bfb0076179c152c80cdb31d80bf138f90 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 20 Nov 2012 08:57:26 +0000 Subject: [PATCH] [asan] better support for powerpc and sparc targets (thanks to H.J. Liu and David Miller) llvm-svn: 168358 --- compiler-rt/lib/sanitizer_common/sanitizer_linux.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index 3f79163fca55..541f22be8429 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -32,10 +32,9 @@ #include // Are we using 32-bit or 64-bit syscalls? -// We need to list the 64-bit architecures explicitly because for x32 -// (which defines __x86_64__) we have __WORDSIZE == 32, -// but we still need to use 64-bit syscalls. -#if defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) +// x32 (which defines __x86_64__) has __WORDSIZE == 32 +// but it still needs to use 64-bit syscalls. +#if defined(__x86_64__) || __WORDSIZE == 64 # define SANITIZER_LINUX_USES_64BIT_SYSCALLS 1 #else # define SANITIZER_LINUX_USES_64BIT_SYSCALLS 0