Patchwork ARM multilib changes for RTEMS

login
register
mail settings
Submitter Sebastian Huber
Date Nov. 4, 2011, 8:34 a.m.
Message ID <4EB3A3A8.7070907@embedded-brains.de>
Download mbox | patch
Permalink /patch/123574/
State New
Headers show

Comments

Sebastian Huber - Nov. 4, 2011, 8:34 a.m.
Hello,

please have a look at the attached patch.  It is intended for inclusion in the 
GCC 4.7 branch.  The embedded brains GmbH has a copyright assignment with the FSF.

Kind regards,
	Sebastian
Ralf Corsepius - Nov. 4, 2011, 2:54 p.m.
On 11/04/2011 09:34 AM, Sebastian Huber wrote:
> Hello,
>
> please have a look at the attached patch. It is intended for inclusion
> in the GCC 4.7 branch. The embedded brains GmbH has a copyright
> assignment with the FSF.

This patch is OK with me.

Ralf

Patch

2011-11-04	Thomas Dörfler <thomas.doerfler@embedded-brains.de>

	* config/arm/rtems-elf.h, config/arm/t-rtems: Add optional
	support for VFP floating point model.

diff --git a/gcc/config/arm/rtems-elf.h b/gcc/config/arm/rtems-elf.h
index 8d5a1d7..d9d24a7 100644
--- a/gcc/config/arm/rtems-elf.h
+++ b/gcc/config/arm/rtems-elf.h
@@ -35,7 +35,7 @@ 
  */
 #undef SUBTARGET_EXTRA_ASM_SPEC
 #define SUBTARGET_EXTRA_ASM_SPEC "\
-  %{!mfloat-abi=hard: %{!mfloat-abi=soft:-mfpu=softfpa}}"
+  %{!mfloat-abi=hard: %{!mfpu=vfp: %{!mfloat-abi=soft:-mfpu=softfpa}}}"
 
 /*
  *  The default includes --start-group and --end-group which conflicts
diff --git a/gcc/config/arm/t-rtems b/gcc/config/arm/t-rtems
index f12387f..48c463a 100644
--- a/gcc/config/arm/t-rtems
+++ b/gcc/config/arm/t-rtems
@@ -3,8 +3,30 @@ 
 MULTILIB_OPTIONS     = marm/mthumb
 MULTILIB_DIRNAMES    = arm thumb
 MULTILIB_EXCEPTIONS  = 
-MULTILIB_MATCHES     = marm=mno-thumb
 
-MULTILIB_OPTIONS    += mfloat-abi=soft/mfloat-abi=hard
-MULTILIB_DIRNAMES   += soft fpu
-MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
+MULTILIB_OPTIONS    += mfloat-abi=hard/mfloat-abi=softfp
+MULTILIB_DIRNAMES   += fpu softfp
+MULTILIB_EXCEPTIONS += *mthumb*/*mfloat-abi=hard* *mthumb*/*mfloat-abi=softfp*
+
+MULTILIB_OPTIONS    += mfpu=vfp
+MULTILIB_DIRNAMES   += vfp
+MULTILIB_EXCEPTIONS += *mfloat-abi=hard*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa*
+MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp
+
+# default float model is fpa, so don't create a explicit copy of it
+MULTILIB_EXCEPTIONS += *marm*/*mfpa*
+
+# permutations of the options which are useful (+) or make no sense (-),
+# defaults are in brackets:
+# + (arm/soft/fpa)
+# + (arm/soft)/vfp
+# - (arm)/softfp(/fpa)
+# + (arm)/softfp/vfp
+# + (arm)/float-abi=hard(/fpa)
+# - (arm)/float-abi=hard/vfp
+# + thumb/(soft/fpa)
+# + thumb/(soft/)vfp
+# - thumb/softfp/fpa
+# - thumb/softfp/vfp
+# - thumb/float-abi=hard/fpa
+# - thumb/float-abi=hard/vfp