2.6.27.7 - Why -mno-mmx is used when it's Pentium-MMX?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
2.6.27.7 - Why -mno-mmx is used when it's Pentium-MMX?
Hey,
I've been installing the latest Linux kernel 2.6.27.7 from source tarballs and saw a weird thing over the process. The compile scripts seem to ignore the fact I've chosen Pentium-MMX at CPU selection in `make menuconfig` and imply gcc flags like -mno-mmx -mcpu=i686, only -march=pentium-mmx seems to be correct.
Here is the whole parameter list (log of the compile):
I once had something similar when compiling a kernel (2.6.18.1) - its menuconfig seemed a bit broken...
I fixed this by editing the .config file in the kernel source folder by hand. You might need to do this too?
E.g . I did
vi .config
in the kernel source tree, searched for the parameter I wanted (it had to with DMA) and I set that parameter on.
Parameters that are commented / off usually have the form
#FORCE_DMA_BLOCKS
which means it is not set. To set it change it to
FORCE_DMA_BLOCKS=y
(Note the above is only for illustrative purposes - I don't think such a parameter even exists... in any version of the kernel!)
E. g. in your case look for the parameter that you want sent, and see if in the .config you menuconfig produced,if it IS, in fact, set. If it is NOT set, set it like detailed above... It was the only way I managed to get certain options set the way I wanted them set.
Within the configuration file, there are a set of options that determine the target CPU-type and model. I would very strongly suggest that you make sure that the one correct option has been specified, and "beyond that, leave it alone." One can presume that the Kernel Developers (and the other Lesser Gods) knew what they were about...
This is the World of the Arcane Mysteries. Step inside, breathe just a little of the heady incense, and then get the hell out of there...
-march=pentium-mmx defines the CPU that the code will require to run. -mcpu=i686 specifies the CPU that the code is to be optimized for. i686 is actually a synonym for generic and generates code that is not specifically optimized for any processor model, i.e., it should run well on all models.
-mno-mmx says that compiler-generated code must not use the new MMX registers. Only applications use MMX registers; kernel code is not allowed to use them because then the kernel would have to save and restore these registers every time a program makes a system call, which would be less efficient overall.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.