diff mbox series

[23/30,arm,rtems] Update t-rtems for new option framework

Message ID 0c71bd43a66e3cffceae8adbca9fd5f3c199e438.1497004220.git.Richard.Earnshaw@arm.com
State New
Headers show
Series Reworking the -mcpu, -march and -mfpu options | expand

Commit Message

Richard Earnshaw (lists) June 9, 2017, 12:53 p.m. UTC
[This patch has only been fairly lightly tested (I've built a compiler
with all the relevant multilibs and smoke-tested a few combinations to
check that the tools still produce a sensible object file).]

This patch updates the RTEMS build to use the new option framework.
It tries as far as possible to keep the existing supported options,
but there are two necessary changes and one cleanup.  I've also
restructed the file slightly to make it slightly easier (IMO) to
understand.

Necessary changes:

1: ARMv4t does not support a hard-float ABI, the earliest supported
architecture with floating-point support is ARMv5te, so I've rebased
the original fpu/hard libraries to that revision of the architecture.

2: Similarly, the earliest version of the -m profile to support
hardware floating-point is armv7e-m (not armv7-m), so the base
architecture for m-profile with FP has been correspondingly updated.

Clean-up:

1: For greater consistency I've changed the
-mcpu=cortex-m7/-mfpu=fpv5-d16/-mhard-float to
-march=armv7e-m+fp.dp/-mhard-float.  The built-in -mcpu rewrite rules
take care of mapping the existing option sets onto the architecture
string to ensure compatibility.

Since the existing rule set does not contain any MULTILIB_REUSE rules,
I have not added any here this time around, but it would be worth the
maintainers of this file considering whether adding some rules would
make their toolchain more friendly to users.

Finally, I've added lines to reset all the multilib variables at the
head of the file.  I found during testing that some definitions from
t-arm-elf were leaking through and causing unexpected behviour.

	* config/arm/t-rtems: Rewrite for new option framework.
---
 gcc/config/arm/t-rtems | 49 ++++++++++++++++++++++++++++++++-----------------
 1 file changed, 32 insertions(+), 17 deletions(-)

Comments

Sebastian Huber June 9, 2017, 1:02 p.m. UTC | #1
Hello Richard,

thanks for updating the RTEMS multlib configuration. It looks fine to me.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
diff mbox series

Patch

diff --git a/gcc/config/arm/t-rtems b/gcc/config/arm/t-rtems
index 026a589..c073786 100644
--- a/gcc/config/arm/t-rtems
+++ b/gcc/config/arm/t-rtems
@@ -1,22 +1,37 @@ 
 # Custom RTEMS multilibs for ARM
 
-MULTILIB_OPTIONS  = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m/mcpu=cortex-m7 mfpu=neon/mfpu=vfp/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16/mfpu=fpv5-d16 mfloat-abi=hard
-MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m cortex-m7 neon vfp vfpv3-d16 fpv4-sp-d16 fpv5-d16 hard
+# Reset all MULTILIB variables
+
+MULTILIB_OPTIONS	=
+MULTILIB_DIRNAMES	=
+MULTILIB_EXCEPTIONS	=
+MULTILIB_REUSE		=
+MULTILIB_MATCHES	=
+MULTILIB_REQUIRED	=
 
 # Enumeration of multilibs
 
-MULTILIB_EXCEPTIONS =
-
-MULTILIB_REQUIRED =
-MULTILIB_REQUIRED += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
-MULTILIB_REQUIRED += mbig-endian/mthumb/march=armv7-r
-MULTILIB_REQUIRED += mfpu=vfp/mfloat-abi=hard
-MULTILIB_REQUIRED += mthumb/march=armv6-m
-MULTILIB_REQUIRED += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
-MULTILIB_REQUIRED += mthumb/march=armv7-a
-MULTILIB_REQUIRED += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
-MULTILIB_REQUIRED += mthumb/march=armv7-r
-MULTILIB_REQUIRED += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
-MULTILIB_REQUIRED += mthumb/mcpu=cortex-m7/mfpu=fpv5-d16/mfloat-abi=hard
-MULTILIB_REQUIRED += mthumb/march=armv7-m
-MULTILIB_REQUIRED += mthumb
+MULTILIB_OPTIONS	+= mbig-endian
+MULTILIB_DIRNAMES	+= eb
+
+MULTILIB_OPTIONS	+= mthumb
+MULTILIB_DIRNAMES	+= thumb
+
+MULTILIB_OPTIONS	+= march=armv5te+fp/march=armv6-m/march=armv7-a/march=armv7-a+simd/march=armv7-r/march=armv7-r+fp/march=armv7-m/march=armv7e-m+fp/march=armv7e-m+fp.dp
+MULTILIB_DIRNAMES	+= armv5te+fp       armv6-m       armv7-a       armv7-a+simd       armv7-r       armv7-r+fp       armv7-m       armv7e-m+fp        armv7e-m+fp.dp
+
+MULTILIB_OPTIONS	+= mfloat-abi=hard
+MULTILIB_DIRNAMES	+= hard
+
+MULTILIB_REQUIRED	+= mbig-endian/mthumb/march=armv7-r+fp/mfloat-abi=hard
+MULTILIB_REQUIRED	+= mbig-endian/mthumb/march=armv7-r
+MULTILIB_REQUIRED	+= march=armv5te+fp/mfloat-abi=hard
+MULTILIB_REQUIRED	+= mthumb/march=armv6-m
+MULTILIB_REQUIRED	+= mthumb/march=armv7-a+simd/mfloat-abi=hard
+MULTILIB_REQUIRED	+= mthumb/march=armv7-a
+MULTILIB_REQUIRED	+= mthumb/march=armv7-r+fp/mfloat-abi=hard
+MULTILIB_REQUIRED	+= mthumb/march=armv7-r
+MULTILIB_REQUIRED	+= mthumb/march=armv7e-m+fp/mfloat-abi=hard
+MULTILIB_REQUIRED	+= mthumb/march=armv7e-m+fp.dp/mfloat-abi=hard
+MULTILIB_REQUIRED	+= mthumb/march=armv7-m
+MULTILIB_REQUIRED	+= mthumb