2011-07-17 14:54:50 +00:00
|
|
|
# Compute MIPS-specific values
|
2007-09-14 21:17:59 +00:00
|
|
|
|
2008-10-23 13:00:45 +00:00
|
|
|
CT_DoArchTupleValues() {
|
2013-01-20 12:58:22 +00:00
|
|
|
# The architecture part of the tuple
|
2014-05-11 22:09:31 +00:00
|
|
|
CT_TARGET_ARCH="${CT_ARCH}${target_bits_64}${CT_ARCH_SUFFIX:-${target_endian_el}}"
|
2008-05-14 17:49:52 +00:00
|
|
|
|
|
|
|
# Override CFLAGS for endianness:
|
2011-11-20 20:04:31 +00:00
|
|
|
case "${CT_ARCH_ENDIAN}" in
|
|
|
|
big) CT_ARCH_ENDIAN_CFLAG="-EB";;
|
|
|
|
little) CT_ARCH_ENDIAN_CFLAG="-EL";;
|
2008-05-14 17:49:52 +00:00
|
|
|
esac
|
2010-09-12 20:14:04 +00:00
|
|
|
|
|
|
|
# Override ABI flags
|
|
|
|
CT_ARCH_ABI_CFLAG="-mabi=${CT_ARCH_mips_ABI}"
|
|
|
|
CT_ARCH_WITH_ABI="--with-abi=${CT_ARCH_mips_ABI}"
|
2007-09-14 21:17:59 +00:00
|
|
|
}
|
2016-04-04 15:25:07 +00:00
|
|
|
|
|
|
|
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}"
|
|
|
|
}
|
2016-04-05 21:47:20 +00:00
|
|
|
|
|
|
|
CT_DoArchUClibcCflags() {
|
|
|
|
local cfg="${1}"
|
|
|
|
local cflags="${2}"
|
|
|
|
local f
|
|
|
|
|
|
|
|
for f in ${cflags}; do
|
|
|
|
case "${f}" in
|
|
|
|
-mabi=*)
|
|
|
|
CT_KconfigDisableOption "CONFIG_MIPS_O32_ABI" "${cfg}"
|
|
|
|
CT_KconfigDisableOption "CONFIG_MIPS_N32_ABI" "${cfg}"
|
|
|
|
CT_KconfigDisableOption "CONFIG_MIPS_N64_ABI" "${cfg}"
|
|
|
|
case "${f#-mabi=}" 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}";;
|
|
|
|
*) CT_Abort "Unsupported ABI: ${f#-mabi=}";;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|