mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
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>
This commit is contained in:
committed by
Thomas Petazzoni
parent
2d8f3fc430
commit
9a0a0a976b
@@ -155,6 +155,7 @@ endif
|
||||
CC_TARGET_ARCH_ := $(call qstrip,$(BR2_GCC_TARGET_ARCH))
|
||||
CC_TARGET_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_ABI))
|
||||
CC_TARGET_NAN_ := $(call qstrip,$(BR2_GCC_TARGET_NAN))
|
||||
CC_TARGET_FP32_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_FP32_MODE))
|
||||
CC_TARGET_FPU_ := $(call qstrip,$(BR2_GCC_TARGET_FPU))
|
||||
CC_TARGET_FLOAT_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
|
||||
CC_TARGET_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_MODE))
|
||||
@@ -181,6 +182,10 @@ ifneq ($(CC_TARGET_NAN_),)
|
||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mnan=$(CC_TARGET_NAN_)
|
||||
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_NAN='"$(CC_TARGET_NAN_)"'
|
||||
endif
|
||||
ifneq ($(CC_TARGET_FP32_MODE_),)
|
||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mfp$(CC_TARGET_FP32_MODE_)
|
||||
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FP32_MODE='"$(CC_TARGET_FP32_MODE_)"'
|
||||
endif
|
||||
ifneq ($(CC_TARGET_FPU_),)
|
||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(CC_TARGET_FPU_)
|
||||
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FPU='"$(CC_TARGET_FPU_)"'
|
||||
|
||||
Reference in New Issue
Block a user