Results 1 to 5 of 5
Hey,
I want to know can I make an exe file from c++ code in one computer with I686 Processor and gcc version 4.1.2 redhat and then run my exe ...
- 07-06-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 12
Exe file in Linux
Hey,
I want to know can I make an exe file from c++ code in one computer with I686 Processor and gcc version 4.1.2 redhat and then run my exe file in my board that has Pyramid linux with I586 Processor and no gcc?
Because when I run the created exe file in my board it gives me " Floating point exception" Error!
Thanks for your help,
Shabnam
- 07-06-2010 #2Linux Newbie
- Join Date
- Apr 2010
- Location
- Novosibirsk, Russia
- Posts
- 136
- 07-06-2010 #3
From the gcc man page.
Set an option to generate an executable that will runIntel 386 and AMD x86-64 Options
These -m options are defined for the i386 and x86-64 family of computers:
-mtune=cpu-type
Tune to cpu-type everything applicable about the generated code, except for the ABI and the set of available instructions. The choices for cpu-type are:
generic
Produce code optimized for the most common IA32/AMD64/EM64T processors. If you know the CPU on which your code will run, then you should use the corresponding -mtune option instead of -mtune=generic. But, if you do not know exactly what CPU users of your application will have, then you should use this option.
As new processors are deployed in the marketplace, the behavior of this option will change. Therefore, if you upgrade to a newer version of GCC , the code generated option will change to reflect the processors that were most common when that version of GCC was released.
There is no -march=generic option because -march indicates the instruction set the compiler can use, and there is no generic instruction set applicable to all processors. In contrast, -mtune indicates the processor (or, in this case, collection of processors) for which the code is optimized.
i386
Original Intel's i386 CPU .
i486
Intel's i486 CPU . (No scheduling is implemented for this chip.)
i586, pentium
Intel Pentium CPU with no MMX support.
pentium-mmx
Intel PentiumMMX CPU based on Pentium core with MMX instruction set support.
pentiumpro
Intel PentiumPro CPU .
i686
Same as "generic", but when used as "march" option, PentiumPro instruction set will be used, so the code will run on all i686 familly chips.
on the processor you want to target.
BTW, when you say EXE I take it you mean "Executable"
Some might think you were talking about Microsoft EXE files.
- 07-07-2010 #4Just Joined!
- Join Date
- Jun 2010
- Posts
- 12
Thanks a lot for your help.
I will check it tomorrow and tell you all the result
- 07-07-2010 #5Linux Newbie
- Join Date
- Apr 2010
- Location
- Novosibirsk, Russia
- Posts
- 136
You're welcomed


Reply With Quote
