PING: [libsanitizer, PATCH] Add anitizer_linux_x86_64.lo if __x86_64__ is defined by $CC
H.J. Lu
hjl.tools@gmail.com
Wed Oct 4 21:27:00 GMT 2017
On 9/30/17, H.J. Lu <hjl.tools@gmail.com> 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
> to anitizer_linux_x86_64.lo if __x86_64__ is defined by $CC.
> ---
> libsanitizer/configure.tgt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt
> index 82e8a5513c5..573e3b482e9 100644
> --- 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
> ;;
> --
> 2.13.6
>
>
This file is only used in GCC. I have tested it on i686 and x86-64.
Any objections or comments?
Thanks.
--
H.J.
More information about the Gcc-patches
mailing list