Skip to content
Snippets Groups Projects
Commit 0a342771 authored by Matt Turner's avatar Matt Turner
Browse files

Make sure iwMMXt is only detected on ARM

iwMMXt is incorrectly detected on x86 and amd64. This happens because
the test uses standard _mm_* intrinsic functions which it compiles with
-march=iwmmxt, but when the user has set CFLAGS=-march=k8 for instance,
no error is generated from -march=iwmmxt, even though it's not a valid
flag on x86/amd64. Passing CFLAGS=-march=native does not override the
-march=iwmmxt flag though, which is why it wasn't noticed before.

So, just #error out in the test if the __arm__ preprocessor directive
isn't defined.

Fixes https://bugs.gentoo.org/show_bug.cgi?id=385179



Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
parent 879b7c21
No related branches found
No related tags found
Loading
......@@ -552,6 +552,9 @@ AC_MSG_CHECKING(whether to use ARM IWMMXT intrinsics)
xserver_save_CFLAGS=$CFLAGS
CFLAGS="$IWMMXT_CFLAGS $CFLAGS"
AC_COMPILE_IFELSE([
#ifndef __arm__
#error "IWMMXT is only available on ARM"
#endif
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 3 && __GNUC_MINOR__ < 6))
#error "Need GCC >= 4.6 for IWMMXT intrinsics"
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment