Compiling openjdk6 w/ gcc 4.2.x

David Herron David.Herron at Sun.COM
Mon Mar 24 20:20:43 PDT 2008


I'm checking compiling OpenJDK 6 on Ubuntu 8.04 beta using gcc 4.2.x

I got some compile errors in hotspot files that are compiled with 
-Werror.  The warning that got upgraded to an error had to do with 
string constants being used with a "char *" of some kind.

In some cases there was a struct definition that had a "char *" which 
then was initialized with a string constant.  In other cases functions 
were called where the parameter was declared "char *" but a string 
constant given to it.

In the following patches I either changed the struct definition or made 
a cast on the string constant, depending on the context.

I also had an intermittent failure on 
hotspot/src/share/vm/opto/classes.cpp saying

   In file included from .../hotspot/src/share/vm/opto/classes.cpp:36:
   .../hotspot/src/share/vm/opto/classes.hpp: In member function 
'virtual const Type* PartialSubtypeCheckNode::bottom_type() const':
   .../hotspot/src/share/vm/opto/classes.hpp:309: internal compiler 
error: Segmentation fault

All the above issues do not happen on my Ubuntu 7.10 machine that has 
GCC 4.1.x installed.  They happen on my Ubuntu 8.04 beta machine that 
has GCC 4.2.x

- David Herron


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs2
Url: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20080324/804481ee/attachment.ksh 


More information about the hotspot-dev mailing list