Do not call host_detect_local_cpu when cross-compiling
diff --git a/gcc/config/aarch64/aarch64-jit.cc b/gcc/config/aarch64/aarch64-jit.cc
index 5eb686c..26ed3ea 100644
--- a/gcc/config/aarch64/aarch64-jit.cc
+++ b/gcc/config/aarch64/aarch64-jit.cc
@@ -30,7 +30,9 @@
/* Implement TARGET_JIT_REGISTER_CPU_TARGET_INFO. */
+#ifndef CROSS_DIRECTORY_STRUCTURE
extern const char *host_detect_local_cpu (int argc, const char **argv);
+#endif
void
aarch64_jit_register_target_info (void)
@@ -40,6 +42,7 @@
(val & ((1ULL << number) - 1ULL) << start) >> start
const char *params[] = {"arch"};
+#ifndef CROSS_DIRECTORY_STRUCTURE
const char* local_cpu = host_detect_local_cpu (2, params);
if (local_cpu != NULL)
{
@@ -53,6 +56,7 @@
std::string cpu = arch.substr (arg_pos, end_pos - arg_pos);
jit_target_set_arch (cpu);
}
+#endif
if (targetm.scalar_mode_supported_p (TImode))
{