This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj onLinux, 32 and 64 bit executables.
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Me Myself and I <stargate7thsymbol at live dot co dot uk>
- Cc: gcc-help at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Wed, 14 Sep 2011 08:50:15 +0100
- Subject: Re: gcj onLinux, 32 and 64 bit executables.
- References: <BAY159-W24080BB666923C4DD9D7D5D0040@phx.gbl>
On 14 September 2011 04:41, Me Myself and I wrote:
>
> If I successfully compile a Test.java program with gcj Test.java --main=Test -o Test.bin
> on 64 bit linux, I then have a 64 bit Linux exectuable.
>
> If I do similar on 32 bit Linux, I have a 32 bit Linux exectable.
>
> If I am running 64 bit Linux, is there a way to use gcj on this to get a 32 bit Linux bin,
> what should I do for this, where should I look, and can anyone give me any simple,
> practical instructions on how to set it up?
Add -m32 to the gcj command.
Depending on your Linux distro you might need to install some
additional 32-bit packages.