Recommended GCC version?
aph at redhat.com
Fri Jun 20 03:55:56 PDT 2008
Erik Trimble wrote:
> Consequently, it is very sensitive to bugs and changes in a compiler.
> For large organizations (such as those managing a distro), it may make
> sense to put in the effort to make sure their "standard" compiler works
> with OpenJDK. It is none too difficult for even such an org to use a
> different compiler, though.
I have a very bad feeling about this. In the Bad Old Days when I
worked in proprietary software, it was not uncommon that a code base
would only compile correctly with a "blessed" compiler. Eventually,
that compiler would be withdrawn from support or we'd need to use a
new compiler for some other reason, and we'd have to fix the bugs in
our code base to work with the new compiler. I now regard such
antediluvian habits as grossly unprofessional, and I have no desire to
go back to them.
> For smaller companies and individuals, I think we (i.e. the community,
> not just Sun), should _strongly_ encourage them to pick one of the
> handful of "official" compilers, which are specified in the source
Quite a few Linux distros are downstream of Red Hat, and start with a
compiler built from the Red Hat branch. The RH compiler has built an
entire Linux distro, after all.
The changes we had to make to build OpenJDK with gcc 4.3 were to fix
nonstandard C++ code and to turn off -Werror because gcc 4.3 is much
more fulsome in its warnings. Rather than insist on using an older
compiler, we would probably be better off fixing the code that
generates the warnings.
> Certainly, we should pick compiler versions which are easily
> available, and will remain so for several years.
One of the great things about pushing HotSpot into the open is that it
will be useful as a test for compilers. If, as you say, it is so much
harder to compile than virtually any other piece of software, it will
be a great test.
More information about the build-dev