我正在嘗試爲使用交叉編譯的powerpc構建gcc 4.3-74。我使用了下面的configure命令來配置make文件。未知的類型名稱__locale_(同時構建gcc for powerpc)
的./configure --build = i686的-PC-Linux的GNU --target = PowerPC的Linux的 主機= PowerPC的Linux的--with-GMP =/XXX /包括--with-GMP -include =/XXX /包括--with-GMP-LIB =/XXX/lib目錄
配置成功完成,但是當我做一個補充,它與下面的消息
In file included from ../.././libiberty/floatformat.c:31:0:
/usr/include/string.h:548:5: error: unknown type name ‘__locale_t’
__locale_t __loc)
^
/usr/include/string.h:552:18: error: unknown type name ‘__locale_t’
失敗它似乎沒有爲powerpc獲取正確的頭文件。
當我沒有選項--host = powerpc-linux配置時,我遇到了與構建binutils類似的問題。只要我在配置中使用了選項--host = powerpc-linux,在binutils的情況下,同樣的錯誤消失了。
我正在使用GCC 4.8,並且仍然存在與OP提到的相同的問題。 – rkioji 2017-04-12 06:21:43