[PATCH] Allow -fsanitize=thread without -pie

Jeff Law law@redhat.com
Mon Dec 1 18:27:00 GMT 2014


On 11/26/14 12:43, Jakub Jelinek wrote:
> On Fri, Nov 21, 2014 at 04:20:44PM +0400, Dmitry Vyukov wrote:
>> Yes, I think it's the way to go.
>> I've just committed the following revision to clang that removes -pie
>> when compiling with tsan:
>> http://llvm.org/viewvc/llvm-project?view=revision&revision=222526
>> The tests in llvm tree pass with this change.
>
> Ok, here it is.  I think -static still doesn't work, for static linking
> symbols might not be interposed as libtsan wants, so I've changed it
> to match what we do for -fsanitize=address.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2014-11-26  Jakub Jelinek  <jakub@redhat.com>
>
> 	* gcc.c (SANITIZER_SPEC): Don't error on -fsanitize=thread
> 	without -pie or -shared, error on -fsanitize=thread -static instead.
>
> 	* lib/tsan-dg.exp (check_effective_target_fsanitize_thread,
> 	tsan_init): Don't use -fPIE or -pie.
OK.
jeff



More information about the Gcc-patches mailing list