summaryrefslogtreecommitdiff
path: root/scripts/build/arch/mips.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-04-05 21:47:20 (GMT)
committerAlexey Neyman <stilor@att.net>2016-08-23 18:00:27 (GMT)
commitf2ffdf798ddcd5b471a5055c18215ca2988ddf29 (patch)
treee0ab6994e184c92494f7035ccc7080dc0bf11e01 /scripts/build/arch/mips.sh
parentbf3eceb5d9b27fc65c819abe0b7f3cec704917e7 (diff)
First stab at multilib/uClibc.
Create a separate 'libc_backend_once', install headers into a subdirectory (different sets of headers are installed for 32- and 64-bit architectures), and create a symlink for the dynamic linker location expected by GCC. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/arch/mips.sh')
-rw-r--r--scripts/build/arch/mips.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/build/arch/mips.sh b/scripts/build/arch/mips.sh
index 030e77b..6097c89 100644
--- a/scripts/build/arch/mips.sh
+++ b/scripts/build/arch/mips.sh
@@ -47,3 +47,25 @@ CT_DoArchUClibcConfig() {
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS64" "${cfg}"
CT_KconfigDeleteOption "CONFIG_MIPS_ISA_MIPS64R2" "${cfg}"
}
+
+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
+}