Use __aarch64__ instead of __ARM_ARCH, since it's backwards
compatible between GCC versions.

Fixes bug https://bugs.linaro.org/show_bug.cgi?id=3066

Signed-off-by: Petri Savolainen <petri.savolai...@linaro.org>
---
 platform/linux-generic/arch/arm/odp_cpu_arch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/platform/linux-generic/arch/arm/odp_cpu_arch.c 
b/platform/linux-generic/arch/arm/odp_cpu_arch.c
index 91d439d9..fd1b3ed6 100644
--- a/platform/linux-generic/arch/arm/odp_cpu_arch.c
+++ b/platform/linux-generic/arch/arm/odp_cpu_arch.c
@@ -68,7 +68,7 @@ int cpu_has_global_time(void)
 
 uint64_t cpu_global_time(void)
 {
-#if __ARM_ARCH == 8
+#if __aarch64__
        uint64_t cntvct;
 
        /*
@@ -88,7 +88,7 @@ uint64_t cpu_global_time(void)
 
 uint64_t cpu_global_time_freq(void)
 {
-#if __ARM_ARCH == 8
+#if __aarch64__
        uint64_t cntfrq;
 
        __asm__ volatile("mrs %0, cntfrq_el0" : "=r"(cntfrq) : : );
-- 
2.13.0

Reply via email to