@@ -159,17 +159,16 @@ AS_CASE([$host],
[powerpc*], [ARCH_DIR=powerpc],
[aarch64*], [ARCH_DIR=aarch64],
[arm*], [ARCH_DIR=arm],
- [ARCH_DIR=undefined]
+ [ARCH_DIR=default]
)
AC_SUBST([ARCH_DIR])
##########################################################################
# Warn on the defaults if arch is undefined
##########################################################################
-if test "${ARCH_DIR}" = "undefined";
+if test "${ARCH_DIR}" = "default";
then
- echo "ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}"
- exit 1
+ AC_MSG_WARN([ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}])
fi
##########################################################################
@@ -280,6 +279,7 @@ AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
AM_CONDITIONAL([helper_linux], [test x$helper_linux = xyes ])
AM_CONDITIONAL([ARCH_IS_ARM], [test "x${ARCH_DIR}" = "xarm"])
AM_CONDITIONAL([ARCH_IS_AARCH64], [test "x${ARCH_DIR}" = "xaarch64"])
+AM_CONDITIONAL([ARCH_IS_DEFAULT], [test "x${ARCH_DIR}" = "xdefault"])
AM_CONDITIONAL([ARCH_IS_MIPS64], [test "x${ARCH_DIR}" = "xmips64"])
AM_CONDITIONAL([ARCH_IS_POWERPC], [test "x${ARCH_DIR}" = "xpowerpc"])
AM_CONDITIONAL([ARCH_IS_X86], [test "x${ARCH_DIR}" = "xx86"])
@@ -241,6 +241,16 @@ noinst_HEADERS += arch/aarch64/odp_atomic.h \
arch/default/odp_cpu_idling.h \
arch/aarch64/odp_llsc.h
endif
+if ARCH_IS_DEFAULT
+__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_cycles.c \
+ arch/default/odp_global_time.c \
+ arch/default/odp_sysinfo_parse.c
+if !ODP_ABI_COMPAT
+odpapiabiarchinclude_HEADERS += arch/default/odp/api/abi/cpu.h
+endif
+noinst_HEADERS += arch/default/odp_cpu.h \
+ arch/default/odp_cpu_idling.h
+endif
if ARCH_IS_MIPS64
__LIB__libodp_linux_la_SOURCES += arch/mips64/odp_cpu_cycles.c \
arch/default/odp_global_time.c \
new file mode 100644
@@ -0,0 +1,24 @@
+/* Copyright (c) 2018, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_API_ABI_CPU_H_
+#define ODP_API_ABI_CPU_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ODP_CACHE_LINE_SIZE 64
+
+static inline void odp_cpu_pause(void)
+{
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif