This adds an in intentionally undocumented environment variable
GCC_CPUINFO which can be used to test -mcpu=native.
Tests using this are added later on.
gcc/ChangeLog:
* config/aarch64/driver-aarch64.c (host_detect_local_cpu):
Add GCC_CPUINFO.
uint64_t default_flags = 0;
std::string buf;
size_t sep_pos = -1;
+ char *fcpu_info;
gcc_assert (argc);
if (!arch && !tune && !cpu)
goto not_found;
- f = fopen ("/proc/cpuinfo", "r");
+ fcpu_info = getenv ("GCC_CPUINFO");
+ if (fcpu_info)
+ f = fopen (fcpu_info, "r");
+ else
+ f = fopen ("/proc/cpuinfo", "r");
if (f == NULL)
goto not_found;