CrossCompilation64: Difference between revisions
From LLL
Jump to navigationJump to search
AlainKnaff (talk | contribs) No edit summary |
AlainKnaff (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
Preparation (on Kubuntu): | |||
apt-get install libc6-i386 | |||
apt-get install libc6-dev-i386 | |||
To cross compile 32 bit binaries on a 64 bit machine, try this: | To cross compile 32 bit binaries on a 64 bit machine, try this: | ||
Line 6: | Line 11: | ||
To make a 32bit .deb on a 64 bit machine: | To make a 32bit .deb on a 64 bit machine: | ||
CC="gcc -m32" dpkg-buildpackage -rfakeroot -ai386 | CC="gcc -m32" host_alias=i386-unknown-linux-gnu dpkg-buildpackage -rfakeroot -ai386 |
Latest revision as of 10:29, 26 December 2007
Preparation (on Kubuntu):
apt-get install libc6-i386 apt-get install libc6-dev-i386
To cross compile 32 bit binaries on a 64 bit machine, try this:
gcc -m32 test.c
To make a 32bit .deb on a 64 bit machine:
CC="gcc -m32" host_alias=i386-unknown-linux-gnu dpkg-buildpackage -rfakeroot -ai386