From 4dbc7d3b076caf854e69e40e5fee8eb9994e9df3 Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sun, 9 Jul 2017 08:32:47 +0100 Subject: [PATCH] arch: raise an error when compiling for an unknown ARM platform The nop, read_barrier() and write_barrier() macros have to always be defined but due to the way os/arch-arm.h is written it is possible for them to be undefined when the ARM platform is not recognized. Change things so compiling for an unknown ARM platform raises an explicit compilation error at the point of the problem. Signed-off-by: Sitsofe Wheeler --- arch/arch-arm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arch-arm.h b/arch/arch-arm.h index 31671fdb..dd286d04 100644 --- a/arch/arch-arm.h +++ b/arch/arch-arm.h @@ -14,6 +14,8 @@ #define nop __asm__ __volatile__ ("nop") #define read_barrier() __sync_synchronize() #define write_barrier() __sync_synchronize() +#else +#error "unsupported ARM architecture" #endif #endif -- 2.25.1