libFLAC/cpu.c: Assume Android has SSE
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 12 Jul 2015 02:08:18 +0000 (12:08 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 13 Jul 2015 12:20:29 +0000 (22:20 +1000)
According to https://developer.android.com/ndk/guides/abis.html#x86
Android always support SSE, so there's no need to test SSE OS support.

Why both __ANDROID__ and ANDROID are tested:
http://stackoverflow.com/questions/15328751/android-macro-suddenly-not-defined
http://stackoverflow.com/questions/6374523/how-to-detect-compilation-by-android-ndk-in-a-c-c-file
https://groups.google.com/forum/#!topic/android-ndk/cf9_f1SLXls

Patch-from: lvqcl <lvqcl.mail@gmail.com>

src/libFLAC/cpu.c

index 40c7950..8249500 100644 (file)
@@ -240,6 +240,8 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
 # else
                disable_sse(info);
 # endif
+#elif defined(__ANDROID__) || defined(ANDROID)
+               /* no need to check OS SSE support */
 #elif defined(__linux__)
                int sse = 0;
                struct sigaction sigill_save;