Add sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CC
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 5 Oct 2017 10:39:32 +0000 (10:39 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 5 Oct 2017 10:39:32 +0000 (03:39 -0700)
Since size of "void *" is 4 bytes for x32, check if __x86_64__ is defined
by $CC, instead of

if test x$ac_cv_sizeof_void_p = x8; then

to decide wether sanitizer_linux_x86_64.lo should be used.

PR sanitizer/82379
* configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Set
to sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CC.

From-SVN: r253441

libsanitizer/ChangeLog
libsanitizer/configure.tgt

index a754dc2c5fb7dff5b49de373f8dec3fc53a29241..b893e852e90bf04a4598f4f16e11ab6538101202 100644 (file)
@@ -1,3 +1,9 @@
+2017-10-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR sanitizer/82379
+       * configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Set
+       to sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CC.
+
 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
 
        * libbacktrace/backtrace-rename.h (backtrace_uncompress_zdebug):
index 82e8a5513c596b939ebfc243d098b3654e53136b..573e3b482e9eadaf9dc93e5913f66743aebf508d 100644 (file)
@@ -27,6 +27,8 @@ case "${target}" in
                TSAN_SUPPORTED=yes
                LSAN_SUPPORTED=yes
                TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo
+       fi
+       if echo "int x = __x86_64__;" | $CC -c -x c -o /dev/null - > /dev/null 2>&1; then
                SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS=sanitizer_linux_x86_64.lo
        fi
        ;;