2016-06-14 796 views
2

我的構建和主機平臺是使用suse Linux的X86_64。我的目標平臺是arm-linux-gnueabi。 我使用3.6.0版的clang編譯源代碼。與-target =編譯器運行ARM-Linux的gnueabi 我下面我遇到了這個錯誤消息:'regparm'在此平臺上無效

/usr/include/pthread.h:655:6: error: 'regparm' is not valid on this platform 
    __cleanup_fct_attribute; 
    ^~~~~~~~~~~~~~~~~~~~~~~ 
/usr/include/bits/pthreadtypes.h:222:50: note: expanded from macro '__cleanup_fct_attribute' 
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) 
               ^   ~ 

信息問題是什麼故障?

回答

1

你的問題是什麼? 'regparm'是x86專有屬性,因此編譯器在此處是正確的,並且代碼已損壞。很可能你沒有爲你的目標平臺使用正確的標題。

+0

謝謝。你是對的。 – kevinchow1999

+0

謝謝。你是對的。我編譯了一些可以用gcc編譯的代碼。當編譯器切換到clang時,clang不能搜索某些gcc隱式搜索的路徑。這就是發生這種事的原因。 – kevinchow1999

相關問題