+ifneq (,$(findstring $(ARCH_DETECTED),arm aarch64))
+ DYNAREC = ari64
+
+ifneq ($(findstring __thumb__,$(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h)),)
+ # must disable thumb as ari64 can't handle it
+ CFLAGS += -marm
+endif
+endif
+
+# ODROIDN2
+else ifneq (,$(findstring CortexA73_G12B,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,-version-script=link.T
+ ARCH = arm64
+ DYNAREC ?= ari64
+ CFLAGS += -fomit-frame-pointer -ffast-math -DARM
+ CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53
+
+# ALLWINNER H5
+else ifneq (,$(findstring h5,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,-version-script=link.T
+ ARCH = arm64
+ DYNAREC ?= ari64
+ CFLAGS += -fomit-frame-pointer -ffast-math -DARM
+ CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mtune=cortex-a53