This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error installing previous gcc version

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: <>.  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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]