OSDN Git Service

Update MIPS configuration rules.
authorSteve Ellcey <sellcey@imgtec.com>
Wed, 28 Jan 2015 22:56:07 +0000 (14:56 -0800)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 12 Feb 2015 21:54:59 +0000 (22:54 +0100)
Add a configuration choice for the NaN format on MIPS (either the
standard (legacy) format or the newer IEEE 2008 format.

Change how CPU_LDFLAGS are set for MIPS.  Use the same value as
CPU_CFLAGS since CC is used to do linking.  This ensures consistency
between compiles and links and adds support for N32 ABI to linking.

Signed-off-by: Steve Ellcey <sellcey@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Rules.mak
extra/Configs/Config.mips

index 202f31f..9f5fe85 100644 (file)
--- a/Rules.mak
+++ b/Rules.mak
@@ -412,17 +412,14 @@ ifeq ($(TARGET_ARCH),mips)
        CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32R2)+=-march=mips32r2 -mtune=mips32r2
        CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
        CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64R2)+=-mips64r2 -mtune=mips64r2
-       ifeq ($(strip $(ARCH_BIG_ENDIAN)),y)
-               CPU_LDFLAGS-$(CONFIG_MIPS_N64_ABI)+=-Wl,-melf64btsmip
-               CPU_LDFLAGS-$(CONFIG_MIPS_O32_ABI)+=-Wl,-melf32btsmip
-       endif
-       ifeq ($(strip $(ARCH_LITTLE_ENDIAN)),y)
-               CPU_LDFLAGS-$(CONFIG_MIPS_N64_ABI)+=-Wl,-melf64ltsmip
-               CPU_LDFLAGS-$(CONFIG_MIPS_O32_ABI)+=-Wl,-melf32ltsmip
-       endif
        CPU_CFLAGS-$(CONFIG_MIPS_N64_ABI)+=-mabi=64
        CPU_CFLAGS-$(CONFIG_MIPS_O32_ABI)+=-mabi=32
        CPU_CFLAGS-$(CONFIG_MIPS_N32_ABI)+=-mabi=n32
+
+       CPU_CFLAGS-$(CONFIG_MIPS_NAN_LEGACY)+=-mnan=legacy
+       CPU_CFLAGS-$(CONFIG_MIPS_NAN_2008)+=-mnan=2008
+
+       CPU_LDFLAGS-y += $(CPU_CFLAGS)
 endif
 
 ifeq ($(TARGET_ARCH),nios)
index 4d30d31..76b10c6 100644 (file)
@@ -33,6 +33,21 @@ config CONFIG_MIPS_N64_ABI
 endchoice
 
 choice
+       prompt "Target NAN Encoding"
+       default CONFIG_MIPS_NAN_LEGACY
+       help
+         This is the NAN Encoding you want to use.  Chose either Legacy
+         or 2008.
+
+config CONFIG_MIPS_NAN_LEGACY
+       bool "LEGACY"
+
+config CONFIG_MIPS_NAN_2008
+       bool "2008"
+
+endchoice
+
+choice
        prompt "Target Processor Architecture"
        default CONFIG_MIPS_ISA_1 if CONFIG_MIPS_O32_ABI
        default CONFIG_MIPS_ISA_3 if CONFIG_MIPS_N32_ABI