summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-05-15 23:37:27 (GMT)
committerGitHub <noreply@github.com>2018-05-15 23:37:27 (GMT)
commit844c83cac209ca7f99684dee14f1c3d64c6ee27e (patch)
treed20e985b946381fb49285b5ac00b30d3909d1650 /scripts
parent7d3d4d9e7484b8e48336f7ba4b934661b1562fb8 (diff)
parent66e0a25fd3cdba9b392cc371786a1df211b81076 (diff)
Merge pull request #964 from abrodkin/topic-arc
Add ARC architecture support
Diffstat (limited to 'scripts')
-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
+}