Only gcc in the x86 architectures contain cpuid.h. Therefore this would not
compile in other architectures.
.
To fix this:
1) Pass a warning instead of an error saying that the header file is missing.
2) Disable optimizations if cpuid.h was not found.
.
Behaviour:
1) In non-x86 architectures we have no cpuid.h. We give a warning which I hope
makes sense and is basically saying this is normal in non-x86 architectures and
and we will ALWAYS disable the optimizations.
2) In x86 architectures with cpuid.h we get the desired behaviour and check if
the user request optimizations and if they are supported by the cpu.
3) In x86 architectures w/o cpuid.h we give a warning basically telling the
user to upgrade gcc and we ALWAYS disable optimizations since we can only tell
there is sse/mmx support at build time but not at runtime.
4) In non-x86 architectures with some unexpected cpuid.h the sse/mmx checks
should fail and these optimizations will get disabled.
.
Tested in:
amd64, i386: x86 + cpuid.h
armel, armhf: non-x86 + no cpuid.h
armel, armhf: non-x86 + dummy cpuid.h to pass test
.
The last test should simulate the case of an x86 with no mmx/sse (old i386).
The 2nd test should be equal to x86 + no cpuid.h.
Author: Miguel Colon <debian.micove@gmail.com>