ssedetect: call __builtin_cpu_supports() only if supported
Some compilers don't support the __builtin_cpu_supports built-in,
so let's make them able to compile the project anyway.
Change-Id: I0c90402d8e4c9f196c54b066ff30891c8de3ad2b
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 1c0ceb1..31a99cf 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -397,18 +397,26 @@
#ifdef HAVE_SSE3
printf("Info: SSE3 support compiled in");
+#ifdef HAVE___BUILTIN_CPU_SUPPORTS
if (__builtin_cpu_supports("sse3"))
printf(" and supported by CPU\n");
else
printf(", but not supported by CPU\n");
+#else
+ printf(", but runtime SIMD detection disabled\n");
+#endif
#endif
#ifdef HAVE_SSE4_1
printf("Info: SSE4.1 support compiled in");
+#ifdef HAVE___BUILTIN_CPU_SUPPORTS
if (__builtin_cpu_supports("sse4.1"))
printf(" and supported by CPU\n");
else
printf(", but not supported by CPU\n");
+#else
+ printf(", but runtime SIMD detection disabled\n");
+#endif
#endif
convolve_init();