Ubuntu10.10 installed arm version of Qt encountered error: thread-local storage no

  

Ubuntu10.10 installed arm version of Qt encountered error: thread-local storage not supported for this target

Compile with arm I encountered the following error:

thread/qthread_unix.cpp:117: error: thread-local storage not supported for this target

make[1]: *** [.obj /release-shared-emb-arm/qthread_unix.o] Error 1

make[1]: leaving the directory `/home/soft/qtenv/arm/src/corelib'

make : *** [sub-corelib-make_default-ordered] Error 2

#

Go to the /src/corelib/thread directory

-rwxr-- R-- 1 fsp fsp 20122 2012-03-14 22:01 qthread_unix.cpp*

-rw-r--r-- 1 fsp fsp 18695 2012-03-14 22:01 qthread_win.cpp< Br>

-rw-r--r-- 1 fsp fsp 2684 2012-03-14 22:01 qwaitcondition.h

-rw-r--r-- 1 fsp fsp 6163 2012- 03-14 22:01 qwaitcondition.qdoc

-rw-r--r-- 1 fsp fsp 5730 2012-03-14 22:01 qwaitcondition_symbian.cpp

-rw-r--r-- 1 fsp fsp 6094 2012-03-14 22:01 qwaitcondition_unix.cpp

-rw-r--r-- 1 fsp fsp 6418 2012-03-14 22:01 qwaitcondition_win.cpp

-rw-r--r-- 1 fsp fsp 1259 2012-03-14 22 :01 thread.pri

# vi qthread_unix.cpp

Open the file and find that the HAVE_TLS macro is open to cause an error.

Turn off the macro and compile it. Passed.

So I made the following patch:

110 #define HAVE_TLS

111 #endif

112 #if defined(Q_CC_XLC) | |  Defined (Q_CC_SUN)

113 #define HAVE_TLS

114 #endif

115

116 #ifdef HAVE_TLS

117# static __thread QThreadData *currentThreadData = 0;

118 #endif
zh-CN"],null,[0.97371054],zh-CN"]]]

Copyright © Windows knowledge All Rights Reserved