1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 choice ADK_TARGET_ENDIAN_MODE
6 depends on ADK_TARGET_SYSTEM_GENERIC_ARC \
7 || ADK_TARGET_SYSTEM_GENERIC_AARCH64 \
8 || ADK_TARGET_SYSTEM_GENERIC_ARM \
9 || ADK_TARGET_SYSTEM_GENERIC_CSKY \
10 || ADK_TARGET_SYSTEM_GENERIC_C6X \
11 || ADK_TARGET_SYSTEM_GENERIC_MICROBLAZE \
12 || ADK_TARGET_SYSTEM_GENERIC_MIPS \
13 || ADK_TARGET_SYSTEM_GENERIC_MIPS64 \
14 || ADK_TARGET_SYSTEM_GENERIC_NDS32 \
15 || ADK_TARGET_SYSTEM_GENERIC_PPC64 \
16 || ADK_TARGET_SYSTEM_GENERIC_SH \
17 || ADK_TARGET_SYSTEM_GENERIC_XTENSA \
18 || ADK_TARGET_SYSTEM_SYNOPSYS_NSIM \
19 || ADK_TARGET_SYSTEM_QEMU_ARC \
20 || ADK_TARGET_SYSTEM_QEMU_AARCH64 \
21 || ADK_TARGET_SYSTEM_QEMU_CSKY \
22 || ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_ML605 \
23 || ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_S3ADSP1800 \
24 || ADK_TARGET_SYSTEM_QEMU_MIPS \
25 || ADK_TARGET_SYSTEM_QEMU_MIPS64 \
26 || ADK_TARGET_SYSTEM_QEMU_PPC64 \
27 || ADK_TARGET_SYSTEM_QEMU_SH \
28 || ADK_TARGET_SYSTEM_QEMU_XTENSA
30 config ADK_TARGET_WITH_LITTLE_ENDIAN
32 select ADK_TARGET_LITTLE_ENDIAN
34 config ADK_TARGET_WITH_BIG_ENDIAN
36 select ADK_TARGET_BIG_ENDIAN
40 config ADK_TARGET_LITTLE_ENDIAN
43 config ADK_TARGET_BIG_ENDIAN
46 config ADK_TARGET_ENDIAN_SUFFIX
48 default "le" if ADK_TARGET_LITTLE_ENDIAN && (ADK_TARGET_ARCH_NDS32 || ADK_TARGET_ARCH_PPC64)
49 default "el" if ADK_TARGET_LITTLE_ENDIAN && (ADK_TARGET_ARCH_MIPS || ADK_TARGET_ARCH_MIPS64 || ADK_TARGET_ARCH_MICROBLAZE)
50 default "be" if ADK_TARGET_BIG_ENDIAN && (ADK_TARGET_ARCH_NDS32 || ADK_TARGET_ARCH_AARCH64)
51 default "eb" if ADK_TARGET_BIG_ENDIAN && (ADK_TARGET_ARCH_ARC || ADK_TARGET_ARM || ADK_TARGET_ARCH_SH)
53 config ADK_TARGET_ENDIAN
55 default "little" if ADK_TARGET_LITTLE_ENDIAN
56 default "big" if ADK_TARGET_BIG_ENDIAN
60 default "-l" if ADK_TARGET_LITTLE_ENDIAN
61 default "-b" if ADK_TARGET_BIG_ENDIAN