问题描述
我试图在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的内容张贴在这里:。
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时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!