按照ECOS的说明,下载了binutils-2.13.1.tar.bz2,gcc-core-3.2.1.tar.gz,gcc-g++-3.2.1.tar.gz,newlib-1.11.0.tar.gz和补丁,按照http://ecos.sourceware.org/build-toolchain.html上的说明一步一步的编译,到了编译gcc的时候,就出错误:
/usr/local/gcc-3.2.1/gcc/read-rtl.c: In function ‘read_rtx’:
/usr/local/gcc-3.2.1/gcc/read-rtl.c:662: error: invalid lvalue in increment
一开始以为是补丁没当上,因为我在cygwin上编译没有这个问题,所以把补丁重新打了一次,还是不行,看来问题不在这。没办法,只能用google,一搜,还真有人碰到,只是解决方案不太理想:
/usr/local/gcc-3.2.1/gcc/read-rtl.c: In function ‘read_rtx’:
/usr/local/gcc-3.2.1/gcc/read-rtl.c:662: error: invalid lvalue in increment
一开始以为是补丁没当上,因为我在cygwin上编译没有这个问题,所以把补丁重新打了一次,还是不行,看来问题不在这。没办法,只能用google,一搜,还真有人碰到,只是解决方案不太理想:
t's a problem. Older versions of gcc use a construct which newer看来只能用高版本了。
versions of gcc won't compile. This makes it hard to bootstrap older
versions of gcc with newer versions. This is indeed an absurd
situation.
If you must use gcc 3.2.3, and you must use Fedora Core 4, then I
think your best bet is to first build and install gcc 3.3.6, and then
use that to build gcc 3.2.3.