Formatting code for LinuxCompile


show source only

{{parent page="Linux"}}

===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
%%
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki