compile for a i686 on x86_64?

Sam Varshavchik mrsam at courier-mta.com
Sun Feb 25 04:27:04 UTC 2007


Jeffrey Ross writes:

> Subject kinda says it all.  I have a x86_64 system but would like to 
> compile binaries for a P3 system that does not have a compiler installed 
> (nor the space for one)
> 
> TIA, Jeff

Well, for starters you'll need to install all i386 libraries, starting with 
glibc, and proceeding with all other i386 libraries that you need to build 
your software.

Then, it should be as simple as passing the -m32 option to gcc.  Whatever 
software you're trying to install, you must run its configure script, or do 
whatever you need to do to the software's build scripts, to get it to 
compile all of its source code with an extra compiler gcc option: -m32.

This'll probably work as long as all required i386 libraries are present, 
and the software is configured correctly, and it does not use any Linux 
kernel headers (which will continue to reflect the 64 bit kernel, even when 
building 32-bit stuff).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070224/3f9d9528/attachment-0001.sig>


More information about the fedora-list mailing list