Mailinglist Archive: opensuse (3513 mails)

< Previous Next >
Re: [opensuse] How to compile for i86 on a x64 machine?
  • From: Josef Wolf <jw@xxxxxxxxxxxxx>
  • Date: Tue, 6 Jan 2009 14:37:05 +0100
  • Message-id: <20090106133705.GD9425@xxxxxxxxxxxxxx>
On Tue, Jan 06, 2009 at 01:54:29PM +0100, Mads Martin Joergensen wrote:
* Joe Morris <Joe_Morris@xxxxxxx> [Jan 06. 2009 13:18]:
I have entered 64 bit world with 11.1, and to my surprise, it seems to
work pretty fine so far.

Now I am curious how to compile for 32 bit machines from that 64 bit
machine. Do I really need to use a virtual machine or a cross compiler
or is there a more convenient way?

I guess it depends a bit on what you are building.

Mostly, I am going to build my own stuff.

For a spec file
linux32 rpmbuild -bb --target=i586 xxxx.spec and for a src.rpm, try
linux32 rpmbuild --rebuild --target=i586 xxxx.src.rpm. If it is a
source package, I would guess
linux32 ./configure && make, etc. linux32 is a 32 bit shell. HTH.

Hmm, so

$ linux32 make all

would do the trick? But the make targets (and object files, etc) would
be the same for both 32 bit and 64 bit? Guess that would result in a

the '-m32' option to gcc makes gcc output 32-bit code as well.

With this, different make targets would be possible, so I guess this is
the way to go?
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >