This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING]: [PATCH]: Conditionally include target specific files while building TSAN
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Venkataramanan Kumar <venkataramanan dot kumar at linaro dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Dmitry Vyukov <dvyukov at google dot com>, Kostya Serebryany <kcc at google dot com>, "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Christophe Lyon <christophe dot lyon at linaro dot org>
- Date: Fri, 23 Jan 2015 21:53:43 +0100
- Subject: Re: [PING]: [PATCH]: Conditionally include target specific files while building TSAN
- Authentication-results: sourceware.org; auth=none
- References: <CAJK_mQ04uFxRdtMKMFrgUy097-GvPXUoQ_vKHPeVzSR+QLgoVQ at mail dot gmail dot com> <20150122140336 dot GA1746 at tucnak dot redhat dot com> <CACT4Y+Z1Pcca_V0w4tbhsvO_caxUOwpfxtFRs7iPNSbqVdA3LQ at mail dot gmail dot com> <20150122204447 dot GN1746 at tucnak dot redhat dot com> <CAJK_mQ007O1xF4CRNmZQXN=YPXCkPfX1tmnDyx-Zo4pFGZibgg at mail dot gmail dot com>
Hi Venkat,
> I committed the patch with the change log corrections you said.
>
> https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=220034
unfortunately, it broke bootstrap for an i686-unknown-linux-gnu
--enable-targets=all build: the 64-bit libtsan.so fails to link:
.libs/tsan_interface_atomic.o: In function `__tsan::TraceAddEvent(__tsan::ThreadState*, __tsan::FastState, __tsan::EventType, unsigned long long)':
/vol/gcc/src/hg/trunk/local/libsanitizer/tsan/tsan_rtl.h:715: undefined reference to `__tsan_trace_switch_thunk'
[...
.libs/tsan_rtl_mutex.o:/vol/gcc/src/hg/trunk/local/libsanitizer/tsan/tsan_rtl.h:715: more undefined references to `__tsan_trace_switch_thunk' follow
/vol/gcc/bin/i686/gld-2.24: .libs/libtsan.so.0.0.0: hidden symbol `__tsan_report_race_thunk' isn't defined
/vol/gcc/bin/i686/gld-2.24: final link failed: Bad valu
collect2: error: ld returned 1 exit status
make[6]: *** [libtsan.la] Error 1
The problem is that libsanitizer/configure.ac checks for target
x86_64-*-linux-*, which is wrong in this case. I believe that you need
something like libgcc's host_address instead and then check for either
x86_64-*-linux-* or i?86-*-linux-* and host_address=64.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University