On 29/01/10 15:03, Brent Frère wrote:
Michel-G..Maria-Sube a écrit :
Hello,
I'm working actually on a 86x64 UNIX-like platform and using gcc to compile, my
question is: is it possible to generate 32 bits on a 64bits platform; actually I
don't see any option for that when I'm doing gcc --help
Thank you in advance for answer
cheers
_______________________________________________
Lilux-help mailing list
Lilux-help(a)lilux.lu
http://lilux.lu/mailman/listinfo/lilux-help
Try first
# gcc --help=target
to see what your gcc installation supports. Then, you should be able to
compile for 32bits target this way:
# gcc -m32 <source files>
For sure, if you have in mind to produce an executable object, you must
be sure to have the required librairies and linker available for the
target platform...
Yours,
For the libraries, depending on your distribution (Ubuntu...), you might
need to set up a /usr/lib/gcc/x86_64-linux-gnu/4.3.3/32/ directory, filled
with the contents of /usr/lib/gcc/i486-linux-gnu/4.3.3/ taken from a 32 bit
box. Replace 4.3.3 with appropriate version for your gcc.
Regards,
Alain