error installing previous gcc version
Brian Dessent
brian@dessent.net
Fri Nov 23 04:33:00 GMT 2007
D'arito wrote:
> I've achieved to run the configure script in a gcc-build directory, but I
> got an error withing the make. :
> ../../gcc-3.3.3/gcc/read-rtl.c: In function âread_rtxâ:
> ../../gcc-3.3.3/gcc/read-rtl.c:653: error: invalid lvalue in increment
> make[1]: *** [read-rtl.o] Error 1
> make[1]: Leaving directory `/opt/gcc3/gcc-build/gcc'
> make: *** [all-gcc] Error 2
The reason this won't compile is that the 3.3 code used a nonstandard
language extension here (lvalue cast) that was deprecated in 3.4 and
then removed in 4.0.
You run into these general sorts of problems when trying to compile
older code with a newer gcc, because gcc tends to get more strict about
rejecting invalid code over time rather than more permissive.
The solution is that you need to build an intermediate version (most
likely 3.4.x) and then use that to build your desired 3.3.3 version.
If you want a shortcut you can try applying the obstack.h changes from
this patch: <http://gcc.gnu.org/viewcvs?view=rev&revision=72826>. But
beware that there are almost certainly other incompatibilities lurking
in the gcc code base so using an intermediate version is always the
generally correct solution.
Brian
More information about the Gcc-help
mailing list