arm: Fix rmprofile multilibs when architecture includes +mp or +sec (PR target/93188)
authorRichard Earnshaw <rearnsha@arm.com>
Wed, 8 Jan 2020 09:29:02 +0000 (09:29 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Wed, 8 Jan 2020 09:29:02 +0000 (09:29 +0000)
When only the rmprofile multilibs are built, compiling for armv7-a
should select the generic v7 multilibs.  This used to work before +sec
and +mp were added to the architecture options but it was broken by
that update.  This patch fixes those variants and adds some tests to
ensure that they remain fixed ;-)

PR target/93188
* config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
when only building rm-profile multilibs.

* gcc.target/arm/multilib.exp: Add new tests for rm-profile only.

From-SVN: r279993

gcc/ChangeLog
gcc/config/arm/t-multilib
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/multilib.exp

index 6387fcc9abaf508ff4fac05687d53dda49b50305..b94fb86dc30f4effaf433ac1f57bff4450c76154 100644 (file)
@@ -1,3 +1,10 @@
+2020-01-08  Richard Earnshaw  <rearnsha@arm.com>
+
+       PR target/93188
+       * config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
+       armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
+       when only building rm-profile multilibs.
+
 2020-01-08  Feng Xue  <fxue@os.amperecomputing.com>
 
        PR ipa/93084
index 0e16340557d6fedb905218967d79dfe86bac053d..399343604f0ddf41ff1a07f23c47588c735525d9 100644 (file)
@@ -133,10 +133,19 @@ MULTILIB_MATCHES  += march?armv7-r+fp.sp=march?armv8-r+crc+fp.sp
 
 ifeq (,$(HAS_APROFILE))
 # Map all v7-a
+
 MULTILIB_MATCHES       += march?armv7=march?armv7-a
+
+MULTILIB_MATCHES       += $(foreach ARCH, $(v7_a_arch_variants), \
+                            march?armv7=march?armv7-a$(ARCH))
+
 MULTILIB_MATCHES       += $(foreach ARCH, $(v7_a_nosimd_variants) $(v7_a_simd_variants), \
                             march?armv7+fp=march?armv7-a$(ARCH))
 
+MULTILIB_MATCHES       += $(foreach ARCHVAR, $(v7_a_arch_variants), \
+                            $(foreach ARCH, $(v7_a_nosimd_variants) $(v7_a_simd_variants), \
+                              march?armv7+fp=march?armv7-a$(ARCHVAR)$(ARCH)))
+
 MULTILIB_MATCHES       += march?armv7=march?armv7ve
 
 # ARMv7ve FP/SIMD variants: map down to v7+fp
index 8ee00cebcfcc6dea0acaa96bc3f22115dd11e893..cb3c430510cbf00eabd39d6f73c8595fe511d744 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-08  Richard Earnshaw  <rearnsha@arm.com>
+
+       PR target/93188
+       * gcc.target/arm/multilib.exp: Add new tests for rm-profile only.
+
 2020-01-08  Feng Xue  <fxue@os.amperecomputing.com>
 
        PR ipa/93084
index dc7c171707ab88fa778a942f68a575ac4c9e1a99..e83d1da261b9c638f4db531df5ce2410100c762f 100644 (file)
@@ -442,6 +442,22 @@ if {[multilib_config "aprofile"] } {
        check_multi_dir $opts $dir
     }
 }
+if {[multilib_config "rmprofile"] && ![multilib_config "aprofile"]} {
+    foreach {opts dir} {
+       {-mcpu=cortex-a9 -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp"
+       {-mcpu=cortex-a8 -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp"
+       {-mcpu=cortex-a5 -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard"
+       {-mcpu=cortex-a53 -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard"
+       {-march=armv7-a+fp -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp"
+       {-march=armv7-a+fp -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp"
+       {-march=armv7-a+mp+simd -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp"
+       {-march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard} "thumb/v7+fp/hard"
+       {-march=armv7-a+fp -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard"
+       {-march=armv7-a -mfpu=vfpv4 -mfloat-abi=soft} "thumb/v7/nofp"
+    } {
+       check_multi_dir $opts $dir
+    }
+}
 if {[multilib_config "rmprofile"] } {
     foreach {opts dir} {
        {-mcpu=cortex-m0 -mfpu=auto -mfloat-abi=soft} "thumb/v6-m/nofp"