aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGravatar Vicente Olivert Riera <Vincent.Riera@imgtec.com>2017-06-28 16:17:11 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-16 16:45:22 +0200
commit9a0a0a976bc1094719556065ab5e982c6ca27563 (patch)
tree4cfa0f640d7a0e4e6642a4c603d5dd4f7d7bec48 /arch
parent2d8f3fc430fe4f16c570097cf3dc33aa78ccb702 (diff)
downloadbuildroot-9a0a0a976bc1094719556065ab5e982c6ca27563.tar.gz
buildroot-9a0a0a976bc1094719556065ab5e982c6ca27563.tar.bz2
arch/mips: add support for MIPS32 FP mode
MIPS32 support different FP modes (32,xx,64), so give the user the opportunity to choose between them. That will cause host-gcc to be built using the --with-fp-32=[32|xx|64] configure option. Also the -mfp[32|xx|64] gcc option will be added to TARGET_CFLAGS and to the toolchain wrapper. FP mode option shouldn't be used for soft-float, so we add logic in the toolchain wrapper if -msoft-float is among the arguments in order to not append the -fp[[32|xx|64] option, otherwise the compilation may fail. Information about FP modes here: - https://sourceware.org/binutils/docs/as/MIPS-Options.html - https://dmz-portal.imgtec.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking#5._Generating_modeless_code Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/Config.in3
-rw-r--r--arch/Config.in.mips24
2 files changed, 27 insertions, 0 deletions
diff --git a/arch/Config.in b/arch/Config.in
index e921879d01..f385745e47 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -267,6 +267,9 @@ config BR2_GCC_TARGET_ABI
config BR2_GCC_TARGET_NAN
string
+config BR2_GCC_TARGET_FP32_MODE
+ string
+
config BR2_GCC_TARGET_CPU
string
diff --git a/arch/Config.in.mips b/arch/Config.in.mips
index ee1b43862b..7dd69659d7 100644
--- a/arch/Config.in.mips
+++ b/arch/Config.in.mips
@@ -134,6 +134,30 @@ config BR2_MIPS_SOFT_FLOAT
floating point functions, then everything will need to be
compiled with soft floating point support (-msoft-float).
+choice
+ prompt "FP mode"
+ depends on !BR2_ARCH_IS_64 && !BR2_MIPS_SOFT_FLOAT
+ default BR2_MIPS_FP32_MODE_XX
+ help
+ FP mode to be used
+
+config BR2_MIPS_FP32_MODE_32
+ bool "32"
+ depends on !BR2_MIPS_CPU_MIPS32R6
+
+config BR2_MIPS_FP32_MODE_XX
+ bool "xx"
+
+config BR2_MIPS_FP32_MODE_64
+ bool "64"
+ depends on !BR2_MIPS_CPU_MIPS32
+endchoice
+
+config BR2_GCC_TARGET_FP32_MODE
+ default "32" if BR2_MIPS_FP32_MODE_32
+ default "xx" if BR2_MIPS_FP32_MODE_XX
+ default "64" if BR2_MIPS_FP32_MODE_64
+
config BR2_MIPS_NAN_LEGACY
bool