This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fsanitize=thread support on ppc64
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Maxim Ostapenko <m dot ostapenko at samsung dot com>, gcc at gcc dot gnu dot org, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Mon, 23 Jan 2017 08:42:06 -0600
- Subject: Re: -fsanitize=thread support on ppc64
- Authentication-results: sourceware.org; auth=none
- References: <CGME20170123113432epcas1p2951bfbb1968a143a14b9c54475ff3527@epcas1p2.samsung.com> <20170123113356.GK1867@tucnak> <5885FCE5.5050504@samsung.com> <96208690-44F0-4648-8C24-4A8DC7966B5F@linux.vnet.ibm.com> <20170123143246.GN1867@tucnak>
> On Jan 23, 2017, at 8:32 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Mon, Jan 23, 2017 at 08:22:30AM -0600, Bill Schmidt wrote:
>> TSan support was contributed to LLVM by a student working at one of the US
>> National Labs a while back. I helped him with some of the PPC assembly
>> programming. To my knowledge this is working, but I haven't tested this with
>> GCC. Do you think we want to change the configuration for GCC this late in the
>> release? I can run a quick test with TSan turned on to see where we're at.
>
> I think it should be enabled if it works, even this late.
> I bet we need something like the following patch on top of
> the PR79168 patch.
>
> I'll test both patches on both ppc64le and ppc64.
Sounds good, thanks! Let me know if I can help in any way.
>
> Another question is, it seems upstream has s390{,x}-*-linux* support for
> asan/ubsan, does that work? In that case we should add it to configure.tgt
> too (similarly to the sparc*-*-linux* entry).
CCing Uli for the s390 question.
Bill
>
> 2017-01-23 Jakub Jelinek <jakub@redhat.com>
>
> * configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*.
>
> --- libsanitizer/configure.tgt.jj 2016-11-09 15:22:50.000000000 +0100
> +++ libsanitizer/configure.tgt 2017-01-23 15:25:21.059399613 +0100
> @@ -1,5 +1,5 @@
> # -*- shell-script -*-
> -# Copyright (C) 2012 Free Software Foundation, Inc.
> +# Copyright (C) 2012-2017 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -31,6 +31,11 @@ case "${target}" in
> fi
> ;;
> powerpc*-*-linux*)
> + if test x$ac_cv_sizeof_void_p = x8; then
> + TSAN_SUPPORTED=yes
> + LSAN_SUPPORTED=yes
> + TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_ppc64.lo
> + fi
> ;;
> sparc*-*-linux*)
> ;;
>
>
> Jakub
>