Re: gcj onLinux, 32 and 64 bit executables.

Jonathan Wakely <[email protected]>
Newsgroups gmane.comp.gcc.help,gmane.comp.gcc.java.devel
Message-ID <CAH6eHdTz_jZSrW5ZsUkm5j1QRc-AMQ8ardz4XZhvy_m33wN2sA@mail.gmail.com>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.