HomePage » Linux » LinuxCompile


Compile on Linux

To use a different gcc, for example gcc3, use the environment variable CC

export CC=/usr/bin/gcc34


Force compile of 32-bit objects
To compile 32-bit objects on 64-bit platform, use
export CFLAGS="-m32"


When you check the produced binary, you will see a 32-bit version being compiled.
# file links
links: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared l
nux 2.6.9, not stripped

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki