从 2.9x 升级 GCC

发布于 2024-11-25 18:01:52 字数 1148 浏览 5 评论 0原文

我一直在尝试在我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨洒年华 2024-12-02 18:01:52

来自 http://www.linux-mips.org/wiki/PS2

PS2Dev 的一些人已将 GCC 3.2.2 和 Binutils 2.14 移植到
Playstation 2,但不是为运行 Linux(仅静态 ELF)而开发的。

看起来这里需要一些不平凡的移植工作。

From http://www.linux-mips.org/wiki/PS2:

Some people at PS2Dev have ported GCC 3.2.2 and Binutils 2.14 to the
Playstation 2, but isn't developed to run Linux (only static ELF's).

It looks like some non-trivial porting effort is required here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文