在OpenSolaris 2009.6上编译gcc 4.4.0时出现问题 [英] Problem compiling gcc 4.4.0 on OpenSolaris 2009.6

查看:110
本文介绍了在OpenSolaris 2009.6上编译gcc 4.4.0时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在opensolaris 2009.6上编译gcc 4.4.0。



目前在盒子里(这是一台AMD 64位机器),我有gcc 3.4.6安装。



我解压gcc 4.4.0 tarball。



我设置了以下的env变量:

pre $ c $ export export CXX = / usr / local / bin / g ++
export CC = / usr / local / bin / gcc

然后我运行configure& make,这是我得到的错误信息:

 检查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 
检查对象的后缀files ... configure:error:in`/export/home/me/wd/gcc/gcc-4.4.0/i386-pc-solaris2.11/amd64/libgcc':
configure:error:无法计算目标文件的后缀:无法编译
查看`config.log'以获取更多详细信息。

任何人都有关于如何解决这个错误信息的建议?



/编辑:
config.log的内容张贴在这里:链接文本正常情况下,GCC构建是自举的,即首先使用系统编译器构建GCC C编译器,然后它使用新建的编译器再次重新编译GCC(然后再重新编译一次)。配置行显示它不是系统编译器,而是已经构建的GCC编译器,用于配置测试。



由于失败,问题在于新建的GCC在某种程度上死胎在这里。如果config.log不会帮助你,我会建议在gcc-help@gcc.gnu.org上询问。



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



你也可以看看特定于Solaris的GCC构建说明


I am attempting to compile gcc 4.4.0 on opensolaris 2009.6

Currently in the box (which is a AMD 64bit machine), I have the gcc 3.4.6 installed.

I unpacked the gcc 4.4.0 tarball.

I set the following env variables:

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

Then I ran "configure && make" and this is the error message that I got:

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.

Anyone has any suggestion as to how to work around this error message?

/Edit: Content of the config.log is posted here: link text

解决方案

Normally the GCC build is bootstrapped, i.e. first it uses the system compiler to build GCC C compiler, and then it uses the freshly built compiler to recompile GCC once again (and then even once more time again). The configure line shows that it is not the system compiler but the already-built GCC compiler which is used for configure test there.

Since it fails, the problem is that the freshly-built GCC is somehow "stillborn" here. If config.log will not help you, I'd suggest to ask at gcc-help@gcc.gnu.org.

EDIT: Ah-ha, I think it is the assembler. You are using GNU assembler, but the unsupported options look like they were meant for Sun assembler. This should be solved by adding --with-gnu-as configure option (and then possibly having to specify its path explicitly with --with-as=/usr/gnu/bin/as)

You can also take a look at Solaris-specific GCC build instructions.

这篇关于在OpenSolaris 2009.6上编译gcc 4.4.0时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆