Commit d59ee314 by Richard Earnshaw Committed by Richard Earnshaw

[arm] Update t-rtems for new option framework


[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.

From-SVN: r249301
parent 42093880
2017-06-16 Richard Earnshaw <rearnsha@arm.com> 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) * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
(v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants) (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
(v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants) (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
......
# Custom RTEMS multilibs for ARM # 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 # Reset all MULTILIB variables
MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m cortex-m7 neon vfp vfpv3-d16 fpv4-sp-d16 fpv5-d16 hard
MULTILIB_OPTIONS =
MULTILIB_DIRNAMES =
MULTILIB_EXCEPTIONS =
MULTILIB_REUSE =
MULTILIB_MATCHES =
MULTILIB_REQUIRED =
# Enumeration of multilibs # Enumeration of multilibs
MULTILIB_EXCEPTIONS = MULTILIB_OPTIONS += mbig-endian
MULTILIB_DIRNAMES += eb
MULTILIB_REQUIRED =
MULTILIB_REQUIRED += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard MULTILIB_OPTIONS += mthumb
MULTILIB_REQUIRED += mbig-endian/mthumb/march=armv7-r MULTILIB_DIRNAMES += thumb
MULTILIB_REQUIRED += mfpu=vfp/mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv6-m 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_REQUIRED += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard 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_REQUIRED += mthumb/march=armv7-a
MULTILIB_REQUIRED += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard MULTILIB_OPTIONS += mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv7-r MULTILIB_DIRNAMES += hard
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 += mbig-endian/mthumb/march=armv7-r+fp/mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv7-m MULTILIB_REQUIRED += mbig-endian/mthumb/march=armv7-r
MULTILIB_REQUIRED += mthumb 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment