[PATCH][Revised] Add libgcc/config/t-emutls for darwin

IainS developer@sandoe-acoustics.co.uk
Sun Mar 28 17:40:00 GMT 2010


On 28 Mar 2010, at 06:52, Jack Howarth wrote:

> libgcc_ext. This is because the build of libgcc on darwin is only
> passed -DHAVE_CC_TLS but not -DUSE_TLS (appropriately since darwin
> doesn't have assembler support for TLS but must use EMUTLS instead).

I remain concerned that we have a configuration issue -- shouldn't we  
be discovering that we have EMULTLS anyway?

Also I repeat that, whilst it is true that:

===

dnl Check whether the target assembler supports TLS.
AC_DEFUN([GCC_CHECK_CC_TLS], [
  GCC_ENABLE(tls, yes, [], [Use thread-local storage])
  AC_CACHE_CHECK([whether the target assembler supports thread-local  
storage],
                 gcc_cv_have_cc_tls, [
    AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a =  
b; }],
      [gcc_cv_have_cc_tls=yes], [gcc_cv_have_cc_tls=no])]
    )])
  if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then
    AC_DEFINE(HAVE_CC_TLS, 1,
              [Define to 1 if the target assembler supports thread- 
local storage.])
  fi])

===

succeeds for the case that the assembler supports TLS...
....
  AFAICT it also succeeds for EMULTLS.

Therefore, either:
  we have a config. problem

or the macro comment should be:

    "AC_DEFINE(HAVE_CC_TLS, 1,
              [Define to 1 if the target supports thread-local  
storage.])"

Iain



More information about the Gcc-patches mailing list