Mailinglist Archive: opensuse (3513 mails)

< Previous Next >
Re: [opensuse] How to compile for i86 on a x64 machine?
  • From: Mads Martin Joergensen <mmj@xxxxxx>
  • Date: Tue, 6 Jan 2009 15:04:10 +0100
  • Message-id: <20090106140410.GE97321@xxxxxx>
* Josef Wolf <jw@xxxxxxxxxxxxx> [Jan 06. 2009 14:40]:
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

I'm not sure this works. Try it out.

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?

Yeah. You can always see it by doing

$ file a.out

On the output file to see if it's 64 or 32 bit.

Mads Martin Joergensen,
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >