On Sat, Sep 30, 2017 at 06:12:39PM -0700, H.J. Lu wrote: > 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 anitizer_linux_x86_64.lo should be used. > > I am testing this on i686 and x86-64. OK for trunk and GCC 7 branch if > there are no regression? Please upstream it for me if appropriate. > > Thanks. > > > H.J. > --- > PR sanitizer/82379 > * configure.tgt (ANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Set
s/ANITIZER/SANITIZER/ > to anitizer_linux_x86_64.lo if __x86_64__ is defined by $CC. s/anitizer/sanitizer/ Ok with those changes. > --- a/libsanitizer/configure.tgt > +++ b/libsanitizer/configure.tgt > @@ -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 > ;; > -- Jakub