Skip to content

Commit f76718a

Browse files
committed
Do not call host_detect_local_cpu when cross-compiling
1 parent 5edcace commit f76718a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gcc/config/aarch64/aarch64-jit.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ along with GCC; see the file COPYING3. If not see
3030

3131
/* Implement TARGET_JIT_REGISTER_CPU_TARGET_INFO. */
3232

33+
#ifndef CROSS_DIRECTORY_STRUCTURE
3334
extern const char *host_detect_local_cpu (int argc, const char **argv);
35+
#endif
3436

3537
void
3638
aarch64_jit_register_target_info (void)
@@ -40,6 +42,7 @@ aarch64_jit_register_target_info (void)
4042
(val & ((1ULL << number) - 1ULL) << start) >> start
4143

4244
const char *params[] = {"arch"};
45+
#ifndef CROSS_DIRECTORY_STRUCTURE
4346
const char* local_cpu = host_detect_local_cpu (2, params);
4447
if (local_cpu != NULL)
4548
{
@@ -53,6 +56,7 @@ aarch64_jit_register_target_info (void)
5356
std::string cpu = arch.substr (arg_pos, end_pos - arg_pos);
5457
jit_target_set_arch (cpu);
5558
}
59+
#endif
5660

5761
if (targetm.scalar_mode_supported_p (TImode))
5862
{

0 commit comments

Comments
 (0)