Guard PowerPC feature tests

Clang is producing spurious noise
This commit is contained in:
Jeffrey Walton 2019-10-24 05:33:15 -04:00
parent 20d3db813b
commit a4da9bf6be
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
4 changed files with 16 additions and 13 deletions

View File

@ -1,3 +1,8 @@
#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
#if (GNUC_VERSION >= 4060) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#include <altivec.h>
int main(int argc, char* argv[])
{

View File

@ -1,4 +1,5 @@
#ifdef __GNUC__
#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
#if (GNUC_VERSION >= 4060) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif

View File

@ -1,3 +1,8 @@
#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
#if (GNUC_VERSION >= 4060) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#include <altivec.h>
int main(int argc, char* argv[])
{

View File

@ -1,15 +1,7 @@
// The problem we have here is, it appears only GCC 7.0 and above
// support Power9 builtins. Clang 7.0 has support for some (all?)
// assembly instructions but we don't see builtin support. We can't
// determine the state of XLC. Searching IBM's website for
// terms like 'darn' 'random number' is returning irrelevant hits.
// Searching with Google from the outside returns 0 hits.
//
// The support disconnect means we may report Power9 as unavailable
// and support DARN at the same time. We get into that state because
// we use inline asm to detect DARN availablity in the compiler.
// Also see cpu.cpp and the two query functions; and ppc_power9.cpp
// and the two probe functions.
#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
#if (GNUC_VERSION >= 4060) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#include <altivec.h>
int main(int argc, char* argv[])