Cray: Enable Cray compiler wrapper detection on all platforms
Previously were checking for the `__CRAYXC` and `__CRAYXE` predefined macros. These macros reflect the platform that the compiler wrapper is running on, i.e. Cray XC and Cray XE machines. They are not defined on other platforms such as Apollo80. Switch to the `__CRAYXT_COMPUTE_LINUX_TARGET` macro. The Cray cc/CC/ftn wrappers always define this macro on the command line. This macro has been in use for many years, and is believed to be a reliable way to detect current and older Cray compiler wrappers. Fixes: #21904
This commit is contained in:
parent
214a06ec2e
commit
13144e82cd
@ -26,7 +26,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
@ -77,7 +77,7 @@ int main(int argc, char* argv[])
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
|
@ -20,7 +20,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
@ -76,7 +76,7 @@ int main(int argc, char* argv[])
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
|
@ -108,7 +108,7 @@
|
||||
#else
|
||||
PRINT *, 'INFO:compiler[]'
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]'
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user