summaryrefslogtreecommitdiff
path: root/scripts/build/arch/mips.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-04-04 15:25:07 (GMT)
committerAlexey Neyman <stilor@att.net>2016-08-23 18:00:27 (GMT)
commitbf3eceb5d9b27fc65c819abe0b7f3cec704917e7 (patch)
treef78ed912cda90436d540e39c54cfe0153958943a /scripts/build/arch/mips.sh
parent0fdc1887a7426bf7974f0ca6bb24815dff4a2997 (diff)
uClibc: Split configuration tweaker into per-arch functions.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/arch/mips.sh')
-rw-r--r--scripts/build/arch/mips.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/build/arch/mips.sh b/scripts/build/arch/mips.sh
index 4d732be..030e77b 100644
--- a/scripts/build/arch/mips.sh
+++ b/scripts/build/arch/mips.sh
@@ -14,3 +14,36 @@ CT_DoArchTupleValues() {
CT_ARCH_ABI_CFLAG="-mabi=${CT_ARCH_mips_ABI}"
CT_ARCH_WITH_ABI="--with-abi=${CT_ARCH_mips_ABI}"
}
+
+CT_DoArchUClibcConfig() {
+ local cfg="${1}"
+
+ CT_DoArchUClibcSelectArch "${cfg}" "${CT_ARCH}"
+
+ CT_KconfigDisableOption "CONFIG_MIPS_O32_ABI" "${cfg}"
+ CT_KconfigDisableOption "CONFIG_MIPS_N32_ABI" "${cfg}"
+ CT_KconfigDisableOption "CONFIG_MIPS_N64_ABI" "${cfg}"
+ case "${CT_ARCH_mips_ABI}" in
+ 32)
+ CT_KconfigEnableOption "CONFIG_MIPS_O32_ABI" "${cfg}"
+ ;;
+ n32)
+ CT_KconfigEnableOption "CONFIG_MIPS_N32_ABI" "${cfg}"
+ ;;
+ 64)
+ CT_KconfigEnableOption "CONFIG_MIPS_N64_ABI" "${cfg}"
+ ;;
+ esac
+
+ # FIXME: uClibc (!ng) allows to select ISA in the config; should
+ # match from the selected ARCH_ARCH level... For now, delete and
+ # fall back to default.
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_1" "${cfg}"
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_2" "${cfg}"
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_3" "${cfg}"
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_4" "${cfg}"
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS32" "${cfg}"
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS32R2" "${cfg}"
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS64" "${cfg}"
+ CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS64R2" "${cfg}"
+}