在OpenSolaris 2009.6上编译gcc 4.4.0时出现问题

时间:2009-06-13 14:12:33

标签: gcc solaris opensolaris

我正在尝试在opensolaris 2009.6上编译gcc 4.4.0

目前在盒子里(这是AMD 64bit机器),我安装了gcc 3.4.6。

我解压缩了gcc 4.4.0 tarball。

我设置了以下env变量:

export CXX=/usr/local/bin/g++
export CC=/usr/local/bin/gcc

然后我运行了“configure&& make”,这是我收到的错误消息:

checking for i386-pc-solaris2.11-gcc... /export/home/me/wd/gcc/gcc-4.4.0/host-i386-pc-solaris2.11/gcc/xgcc -B/export/home/me/wd/gcc/gcc-4.4.0/host-i386-pc-solaris2.11/gcc/ -B/usr/local/i386-pc-solaris2.11/bin/ -B/usr/local/i386-pc-solaris2.11/lib/ -isystem /usr/local/i386-pc-solaris2.11/include -isystem /usr/local/i386-pc-solaris2.11/sys-include  -m64
checking for suffix of object files... configure: error: in `/export/home/me/wd/gcc/gcc-4.4.0/i386-pc-solaris2.11/amd64/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

有人对如何解决此错误消息有任何建议吗?

/编辑: config.log的内容发布在此处:link text

2 个答案:

答案 0 :(得分:2)

通常GCC构建是自举的,即首先它使用系统编译器来构建GCC C编译器,然后它使用新构建的编译器再次重新编译GCC(然后再次重新编译)。配置行显示它不是系统编译器,而是已经构建的GCC编译器,用于那里的配置测试。

由于失败,问题在于新建的海湾合作委员会在某种程度上是“死产”。如果config.log对您没有帮助,我建议您在gcc-help@gcc.gnu.org上询问。

编辑:啊哈,我认为这是汇编程序。您正在使用GNU汇编程序,但不受支持的选项看起来像是针对Sun汇编程序的。这应该通过添加--with-gnu-as配置选项来解决(然后可能必须使用--with-as=/usr/gnu/bin/as明确指定其路径)

您还可以查看Solaris-specific GCC build instructions

答案 1 :(得分:1)

gcc4有一个随时可用的版本,您可以尝试更新。它目前的版本是4.3.3。要开始,请从OpenCSW安装pkg-get并从subversion存储库中检查构建:

svn co https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/gcc4/trunk/ gcc4
cd gcc4
gmake package
相关问题