diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-09-12 22:14:04 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-09-12 22:14:04 +0200 |
commit | b92668a21123d0039f9d5df407469cb6c37fce24 (patch) | |
tree | f0c185f7fd70ef9f065d14a8ec885d1adddb4b95 | |
parent | dae205737f585e8fdc6430d68f4d1655e3f71d19 (diff) | |
download | crosstool-ng-b92668a21123d0039f9d5df407469cb6c37fce24.tar.gz crosstool-ng-b92668a21123d0039f9d5df407469cb6c37fce24.tar.bz2 crosstool-ng-b92668a21123d0039f9d5df407469cb6c37fce24.zip |
arch/mips: add option for MIPS ABIs
This adds selection for one of the o32, n32 and n64 ABIs.
Later, we can easily use those boolean options, rather than
relying on a user-supplied string option.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
-rw-r--r-- | config/arch/mips.in | 1 | ||||
-rw-r--r-- | config/arch/mips.in.2 | 38 | ||||
-rw-r--r-- | scripts/build/arch/mips.sh | 4 |
3 files changed, 42 insertions, 1 deletions
diff --git a/config/arch/mips.in b/config/arch/mips.in index 6499b881..52d6de3a 100644 --- a/config/arch/mips.in +++ b/config/arch/mips.in @@ -8,7 +8,6 @@ config ARCH_mips select ARCH_SUPPORTS_BOTH_ENDIAN select ARCH_DEFAULT_BE select ARCH_SUPPORT_ARCH - select ARCH_SUPPORT_ABI select ARCH_SUPPORT_TUNE help The MIPS architecture, as defined by: diff --git a/config/arch/mips.in.2 b/config/arch/mips.in.2 new file mode 100644 index 00000000..ee0424d2 --- /dev/null +++ b/config/arch/mips.in.2 @@ -0,0 +1,38 @@ +# MIPS specific config options + +choice + bool + prompt "ABI" + +config ARCH_mips_o32 + bool + prompt "o32" + depends on ARCH_32 + help + This is the -mabi=32 gcc option. + +config ARCH_mips_n32 + bool + prompt "n32" + depends on ARCH_64 + help + This is the -mabi=n32 gcc option. + +config ARCH_mips_n64 + bool + prompt "n64" + depends on ARCH_64 + help + This is the -mabi=64 gcc option. + +# Not supported on Linux: +# o64 : seems related to *BSD +# eabi : seems related to bare-metal + +endchoice + +config ARCH_mips_ABI + string + default "32" if ARCH_mips_o32 + default "n32" if ARCH_mips_n32 + default "64" if ARCH_mips_n64 diff --git a/scripts/build/arch/mips.sh b/scripts/build/arch/mips.sh index c5b18e5b..3b771b23 100644 --- a/scripts/build/arch/mips.sh +++ b/scripts/build/arch/mips.sh @@ -14,4 +14,8 @@ CT_DoArchTupleValues() { y,) CT_ARCH_ENDIAN_CFLAG="-EB";; ,y) CT_ARCH_ENDIAN_CFLAG="-EL";; esac + + # Override ABI flags + CT_ARCH_ABI_CFLAG="-mabi=${CT_ARCH_mips_ABI}" + CT_ARCH_WITH_ABI="--with-abi=${CT_ARCH_mips_ABI}" } |