Bug 728136 - Port bug 528687 to comm-central. r=Callek
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 17 Feb 2012 13:51:53 +0100
changeset 10854 a8cd397bf450d3c7e36b9e750933129a69d6e9ea
parent 10853 4f7b194ab8fa6cddd45852bb4ded26586dbed24c
child 10855 1fd048add6cb2aef6402b815aa43633e3cb5bd6f
push idunknown
push userunknown
push dateunknown
reviewersCallek
bugs728136, 528687
Bug 728136 - Port bug 528687 to comm-central. r=Callek
configure.in
--- a/configure.in
+++ b/configure.in
@@ -4102,17 +4102,26 @@ LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_L
 AC_CACHE_CHECK(for __thread keyword for TLS variables,
                ac_cv_thread_keyword,
                [AC_TRY_LINK([__thread bool tlsIsMainThread = false;],
                             [return tlsIsMainThread;],
                             ac_cv_thread_keyword=yes,
                             ac_cv_thread_keyword=no)])
 LDFLAGS=$_SAVE_LDFLAGS
 if test "$ac_cv_thread_keyword" = yes; then
-  AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
+  # mips builds fail with TLS variables because of a binutils bug.
+  # See bug 528687
+  case "${target}" in
+    mips*-*)
+      :
+      ;;
+    *)
+      AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
+      ;;
+  esac
 fi
 
 dnl Check for the existence of various allocation headers/functions
 
 MALLOC_H=
 AC_CHECK_HEADER(malloc.h,        [MALLOC_H=malloc.h])
 if test "$MALLOC_H" = ""; then
   AC_CHECK_HEADER(malloc/malloc.h, [MALLOC_H=malloc/malloc.h])