summaryrefslogtreecommitdiff
path: root/scripts/build/arch
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2018-05-14 19:09:31 (GMT)
committerAlexey Brodkin <abrodkin@synopsys.com>2018-05-15 13:37:08 (GMT)
commit86bbb146495c46ccc355778f1504cade4c3627dc (patch)
tree3ee437a58e9f3aa5e4d6c3bce6a2a9c738702b80 /scripts/build/arch
parent7d3d4d9e7484b8e48336f7ba4b934661b1562fb8 (diff)
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 <abrodkin@synopsys.com>
Diffstat (limited to 'scripts/build/arch')
-rw-r--r--scripts/build/arch/arc.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/build/arch/arc.sh b/scripts/build/arch/arc.sh
new file mode 100644
index 0000000..fb9d93b
--- /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
+}