Ubuntu10.10安装arm版本的Qt遇到error: thread-local storage not supported for this target

Ubuntu10.10安装arm版本的Qt遇到error: thread-local storage not supported for this target

用arm编译的时候却碰到如下错误:

thread/qthread_unix.cpp:117: error: thread-local storage not supported for this target
make[1]: *** [.obj/release-shared-emb-arm/qthread_unix.o] 错误 1
make[1]:正在离开目录 `/home/soft/qtenv/arm/src/corelib'
make: *** [sub-corelib-make_default-ordered] 错误 2
#


 

 

去看了下/src/corelib/thread目录下

-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
-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
打开文件, 发现HAVE_TLS宏打开了才会导致错误,

关掉该宏后再编译, 果然通过了。

 

于是就打了如下补丁:

    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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值