File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212ifeq ($(CORE), POWER10)
1313ifneq ($(C_COMPILER), PGI)
14+ ifeq ($(C_COMPILER), GCC))
15+ ifeq ($(GCCVERSIONGTEQ10), 1)
1416CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
17+ else ifneq ($(GCCVERSIONGT4), 1)
18+ $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
19+ CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
20+ else
21+ $(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended)
22+ CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
23+ endif
24+ else
25+ CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
26+ endif
1527ifeq ($(F_COMPILER), IBM)
1628FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize
1729else
Original file line number Diff line number Diff line change @@ -66,8 +66,7 @@ static int cpuid(void)
6666#endif
6767 return CPU_UNKNOWN ;
6868}
69- #else
70- #if defined(C_PGI ) || defined(__clang__ )
69+ #elif defined(C_PGI ) || defined(__clang__ )
7170/*
7271 * NV HPC compilers do not yet implement __builtin_cpu_is().
7372 * Fake a version here for use in the CPU detection code below.
@@ -196,13 +195,21 @@ static int cpuid(void)
196195 cpu_type = pvrPOWER [i ].cpu_type ;
197196 return (int )(cpu_type );
198197}
199- #endif /* C_PGI */
198+ #elif !defined(__BUILTIN_CPU_SUPPORTS__ )
199+ static int cpuid (void )
200+ {
201+ return CPU_UNKNOWN ;
202+ }
200203#endif /* _AIX */
201204
202205#ifndef __BUILTIN_CPU_SUPPORTS__
203206#include <string.h>
204207
205- #if defined(_AIX ) || (defined(__has_builtin ) && !__has_builtin (__builtin_cpu_is ))
208+ #ifndef __has_builtin
209+ #define __has_builtin (x ) 0
210+ #endif
211+
212+ #if defined(_AIX ) || !__has_builtin (__builtin_cpu_is )
206213static int __builtin_cpu_is (const char * arg )
207214{
208215 static int ipinfo = -1 ;
@@ -227,7 +234,7 @@ static int __builtin_cpu_is(const char *arg)
227234}
228235#endif
229236
230- #if defined(_AIX ) || (defined( __has_builtin ) && !__has_builtin (__builtin_cpu_supports ) )
237+ #if defined(_AIX ) || !__has_builtin (__builtin_cpu_supports )
231238static int __builtin_cpu_supports (const char * arg )
232239{
233240 return 0 ;
You can’t perform that action at this time.
0 commit comments