From 86bbb146495c46ccc355778f1504cade4c3627dc Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Mon, 14 May 2018 22:09:31 +0300 Subject: Add ARC architecture support Synopsys' DesignWare ARC Processors are a family of 32-bit CPUs that SoC designers can optimize for a wide range of uses, from deeply embedded to high-performance host applications in a variety of market segments. Signed-off-by: Alexey Brodkin --- scripts/build/arch/arc.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 scripts/build/arch/arc.sh (limited to 'scripts/build') diff --git a/scripts/build/arch/arc.sh b/scripts/build/arch/arc.sh new file mode 100644 index 00000000..fb9d93b6 --- /dev/null +++ b/scripts/build/arch/arc.sh @@ -0,0 +1,34 @@ +# Compute ARC-specific values + +CT_DoArchTupleValues() { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${target_endian_eb}}" + + # The system part of the tuple: + case "${CT_LIBC}" in + glibc) CT_TARGET_SYS=gnu;; + uClibc) CT_TARGET_SYS=uclibc;; + esac +} + +CT_DoArchUClibcConfig() { + local cfg="${1}" + + CT_DoArchUClibcSelectArch "${cfg}" "arc" +} + +CT_DoArchUClibcCflags() { + local cfg="${1}" + local cflags="${2}" + local f + + CT_KconfigDeleteOption "CONFIG_ARC_HAS_ATOMICS" "${cfg}" + + for f in ${cflags}; do + case "${f}" in + -matomic) + CT_KconfigEnableOption "CONFIG_ARC_HAS_ATOMICS" "${cfg}" + ;; + esac + done +} -- cgit v1.2.3