You need to install the gcc-mutlilib package. Then:
$ gcc -o hello -m32 hello.c
the -m32 flag tells the compiler to target the 32-bit architecture instead of the 64-bit architecture
Also, you may need to take a look at this looooooong discussion:
http://ubuntuforums.org/showthread.php?t=24575
For kernel compiling, you will need to explicitly specify the architecture:
$ make ARCH=i386 menuconfig
$ make ARCH=i386 bzImage
Happy compiling :)
*** Returning to this issue with Makefiles
just run:
$make CFLAGS=-m32 LDFLAGS=-m32
this adds the -m32 option to both the compiler flags and the linker flags
Popular Posts
-
One of the most important metrics used in evaluating the performance of binary classifiers is the Precision-Recall curve. From Wikipedia: It...
-
Bugzilla is a great project. Yet, customizing it to your needs is an overwhelming task! I was assigned a task that our Bugzilla server shoul...
-
Indeed, this is one of the best articles I have read in a very long time! The author takes a deep look at the shutdown of the library.nu web...
-
Today I had the opportunity to attend a session given by Dr. Moustafa Youssef on his research. The key point in his talk was about detectin...
-
Sometimes you have to deal with the .Net framework in a way or another. I was forced to use a .Net C# closed-source library. And that librar...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment