From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8381 invoked by alias); 14 Sep 2011 07:50:36 -0000 Received: (qmail 8359 invoked by uid 22791); 14 Sep 2011 07:50:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC X-Spam-Check-By: sourceware.org Received: from mail-pz0-f48.google.com (HELO mail-pz0-f48.google.com) (209.85.210.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Sep 2011 07:50:16 +0000 Received: by pzk34 with SMTP id 34so2965765pzk.35 for ; Wed, 14 Sep 2011 00:50:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.8.166 with SMTP id s6mr3274401pba.398.1315986615852; Wed, 14 Sep 2011 00:50:15 -0700 (PDT) Received: by 10.143.16.15 with HTTP; Wed, 14 Sep 2011 00:50:15 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 Sep 2011 07:50:00 -0000 Message-ID: Subject: Re: gcj onLinux, 32 and 64 bit executables. From: Jonathan Wakely To: Me Myself and I Cc: gcc-help@gcc.gnu.org, java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00011.txt.bz2 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.