从 2.9x 升级 GCC
我一直在尝试在我的 PS2 Linux 机器(mips)上从 2.95.2 升级编译器,我的头快要爆炸了。我不会声称我擅长 Linux。
我将首先回顾一下我已经完成的过程。
gcc 3.3.1 下载、配置、安装
../gcc-3.3/configure --enable-shared --disable-checking --with-system-zlib --program-suffix=3 --with-gnu-ld --enable-threads=posix
这个编译了大约一个小时然后给出了错误,部分错误。
> /tmp/cc0GVsc4.s:1175: Error: Can not represent BFD_RELOC_32_PCREL relocation in this object file format
> /tmp/cc0GVsc4.s:1205: Error: Can not represent BFD_RELOC_32_PCREL relocation in this object file format
经过一番谷歌搜索后,这似乎表明我的 binutils 需要升级。
binutils 2.13.2 下载安装
这个编译/安装好没有抱怨。
gcc 3.3.1 回到尝试编译 gcc3,我知道在配置过程中出现错误。
as: unrecognized option `-mwarm-short-loop'
*** The command '/usr/bin/gcc -o conftest -O2 conftest.c' failed.
*** You must set the enviroment variable CC to a working compiler.
我现在无法编译一个简单的 helloworld.cpp 程序,而不知道
as: unrecognized option `-mwarm-short-loop'
问题是什么 -mwarm-short-loop 在 google 中返回零,这是不常见的。 或者有什么特定于升级 gcc 的东西我错过了。
I've been trying to upgrade the compiler from 2.95.2 on my PS2 Linux machine (mips) and my head is about to explode. I am not going to claim that I am good with linux.
I'll go over the process I've done first.
gcc 3.3.1 download, configure, install
../gcc-3.3/configure --enable-shared --disable-checking --with-system-zlib --program-suffix=3 --with-gnu-ld --enable-threads=posix
This compiled for about an hour then gave an error, part of it.
> /tmp/cc0GVsc4.s:1175: Error: Can not represent BFD_RELOC_32_PCREL relocation in this object file format
> /tmp/cc0GVsc4.s:1205: Error: Can not represent BFD_RELOC_32_PCREL relocation in this object file format
After some googling this seemed to point to my binutils needed upgrading.
binutils 2.13.2 download install
this compiled/installed ok no complaints.
gcc 3.3.1 back to trying to compile gcc3 and I know get an error during configure.
as: unrecognized option `-mwarm-short-loop'
*** The command '/usr/bin/gcc -o conftest -O2 conftest.c' failed.
*** You must set the enviroment variable CC to a working compiler.
I cant compile even a simple helloworld.cpp program now without getting
as: unrecognized option `-mwarm-short-loop'
Any ideas what the problem is -mwarm-short-loop return zero in google which is unusal.
Or is there something specific to upgrading gcc that I have missed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 http://www.linux-mips.org/wiki/PS2:
看起来这里需要一些不平凡的移植工作。
From http://www.linux-mips.org/wiki/PS2:
It looks like some non-trivial porting effort is required here.