[hotspot-dev] JIT compiler generate x86 and x86_64 binary

Volker Simonis volker.simonis at gmail.com
Wed Oct 6 08:01:34 PDT 2010

Building a 32-bit HotSpot on a 64-bit Linux System can be done as
follows (just copied and pasted from an internal memo):

If you are working on a 64-bit system and want to build a 32-bit VM,
you have to use a 32-bit boot JVM, i.e. one that supports the -d32
option (see ALT_BOOTDIR option above). The 32-bit JVM is not strictly
needed for the build, but for the concluding smoke test. Depending on
your system, you may also have to install the 32-bit development
libraries and headers (e.g. g++-multilib on Ubuntu). Additionally you
have to set the environment variable ARCH_DATA_MODEL=32 and you
probably want to use DEBUG_CFLAGS/i486=-g to instruct the make to
generate the default and most expressive debugging format. Otherwise,
-gstabs will be used on 32-bit systems which is not the preferred
debugging format anymore. So building a 32-bit HotSpot VM on a 64-bit
Linux system where warnings wont be treated as errors can be done with
the following command line:

> ALT_BOOTDIR=/share/software/Java/jdk1.6.0_21 \
   ALT_OUTPUTDIR=../output_x86_dbg \
  make jvmg WARNINGS_ARE_ERRORS= DEBUG_CFLAGS/i486=-g 2>&1 | tee

You can then use the newly created libjvm.so with an existing 32-bit
JDK/JRE by replacing the original library with the new one.


On Sun, Oct 3, 2010 at 1:33 PM, 邱筱惠 <joannechiou at gmail.com> wrote:
> hi, all
> i built openjdk6 on x86_64 machine, and actually JIT compiler generated
> codes for x86_64,
> now i try to make JIT compiler can generate x86 32 bits codes. because
> x86_32 binary could run
> on x86_64 machine.
> Is this idea feasible? and any other hint to do this?
> thanks.
> Chiou

More information about the hotspot-dev mailing list