diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2018-05-14 22:09:31 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2018-05-15 16:37:08 +0300 |
commit | 86bbb146495c46ccc355778f1504cade4c3627dc (patch) | |
tree | 3ee437a58e9f3aa5e4d6c3bce6a2a9c738702b80 | |
parent | 7d3d4d9e7484b8e48336f7ba4b934661b1562fb8 (diff) | |
download | crosstool-ng-86bbb146495c46ccc355778f1504cade4c3627dc.tar.gz crosstool-ng-86bbb146495c46ccc355778f1504cade4c3627dc.tar.bz2 crosstool-ng-86bbb146495c46ccc355778f1504cade4c3627dc.zip |
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>
-rw-r--r-- | config/arch/arc.in | 15 | ||||
-rw-r--r-- | scripts/build/arch/arc.sh | 34 |
2 files changed, 49 insertions, 0 deletions
diff --git a/config/arch/arc.in b/config/arch/arc.in new file mode 100644 index 00000000..fc4e64fb --- /dev/null +++ b/config/arch/arc.in @@ -0,0 +1,15 @@ +# ARC specific configuration file + +## no-package +## select ARCH_SUPPORTS_32 +## select ARCH_DEFAULT_32 +## select ARCH_SUPPORTS_BOTH_MMU +## select ARCH_DEFAULT_HAS_MMU +## select ARCH_SUPPORTS_EITHER_ENDIAN +## select ARCH_DEFAULT_LE +## select ARCH_SUPPORTS_WITH_CPU +## select GCC_REQUIRE_7_or_later +## select BINUTILS_REQUIRE_2_30_or_later +## +## help The Synopsys DesignWare ARC architecture, see more info here: +## help https://www.synopsys.com/designware-ip/processor-solutions/arc-processors.html 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 +} |