PATCH: Use Intel BID library for BID

David Daney ddaney@avtrex.com
Thu Jun 14 23:50:00 GMT 2007


H. J. Lu wrote:
> On Thu, Jun 14, 2007 at 03:21:56PM -0700, David Daney wrote:
>> H. J. Lu wrote:
>>> On Fri, Jun 15, 2007 at 09:15:39AM +1200, Danny Smith wrote:
>>>>> -----Original Message-----
>>>>> From: gcc-patches-owner@gcc.gnu.org 
>>>>> [mailto:gcc-patches-owner@gcc.gnu.org] On Behalf Of H. J. Lu
>>>>>
>>>>> # See if we support thread-local storage.
>>>>> GCC_CHECK_TLS
>>>>>
>>>>> in configure.ac. But libgcc is different since the newly built gcc
>>>>> isn't available to create executable to run run-time test,
>>>>> which is needed for GCC_CHECK_TLS, because libgcc is yet to be built.
>>>> Doesn't Richard Henderson's TLS emulation take care of targets without
>>>> assembler support for TLS?
>>>>
>>>> 2007-02-10  Richard Henderson  <rth@redhat.com>
>>>> 	    Jakub Jelinek  <jakub@redhat.com>
>>>> 	    Alexandre Oliva  <aoliva@redhat.com>
>>>>
>>>> 	* Makefile.in (libgcc-support, libgcc.mvars): Add emutls.c.
>>>>
>>>> It does for windows targets even though HAVE_AS_TLS is undefined. 
>>>> Note alose that rth's patch removed the need for 
>>>> /* { dg-require-effective-target tls } */ in gcc.dg/tls/
>>>>
>>> We want to know if we can use __thread in libgcc in all cases.  That
>>> is what GCC_CHECK_TLS in config/tls.m4 is checking.  Maybe I should 
>>>
>>> if test x$build = x$target; then
>>>  if test x$enable_tls = x; then
>>>    enable_tls=yes
>>>  fi
>>>  GCC_CHECK_TLS
>>> fi
>>>
>> What are the advantages of not allowing cross compilers to be configured 
>> for tls here?
> 
> We want to know if the target supports TLS, not the build machine
> since CC is for the build machine, not target when you build
> a cross compiler.

That doesn't make any sense.  Why would you be checking if the build 
compiler supports certain features when configuring libgcc?

configure for the compiler being used to build libgcc has already 
determined if tls is supported.  If you think it got the wrong answer, 
you should fix the problem at the source, not in libgcc's configure.


> 
>> gcc/configure.ac already checks for tls, why can't we rely on that check 
>> getting the correct answer?
> 
> Assembler accepts __thread doesn't mean that target supports TLS
> at run-time.
> 

That is why we have the --disable-tls configure option.  When 
--disable-tls is needed, it can be supplied.  Unilaterally disabling 
TLS,  because you don't trust people that build cross compilers, does 
not seem like a good policy.

David Daney



More information about the Gcc-patches mailing list