]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[arm] Update t-rtems for new option framework
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jun 2017 21:05:46 +0000 (21:05 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jun 2017 21:05:46 +0000 (21:05 +0000)
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249301 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/t-rtems

index 730d7e96d669de217955056a3c967068cc4998a2..f603df53075e02f172f98c223f3abb51d221d06d 100644 (file)
@@ -1,3 +1,7 @@
+2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/t-rtems: Rewrite for new option framework.
+
 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
 
        * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
index 026a58956623ca8f74980f1a69b241b88e4988e7..c07378657c8289014fc875a426e48b48b7c1f690 100644 (file)
@@ -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