]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vxworks: support aarch64 errata
authorAlexandre Oliva <oliva@adacore.com>
Mon, 11 May 2026 06:47:03 +0000 (03:47 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Tue, 12 May 2026 07:31:57 +0000 (04:31 -0300)
I noticed that aarch64 errata required specs tweaks that were missing
on vxworks.  To my surprise, adding those specs enabled even the
linker tests to pass, despite using vxlink and not always performing
final links.  Ok, then, reverting the skip directives added not too
long ago.

for  gcc/ChangeLog

* config.gcc [aarch64*-wrs-vxworks*] (tm_file): Add
aarch64/aarch64-errata.h.
* config/aarch64/aarch64-vxworks.h (LINK_SPEC): Add
AARCH64_ERRATA_LINK_SPEC.
(CC1_SPEC, CC1PLUS_SPEC): Add AARCH64_ERRATA_COMPILE_SPEC.

for  gcc/testsuite/ChangeLog

* gcc.target/aarch64/erratas_opt_0.c: Revert skip on VxWorks.
* gcc.target/aarch64/erratas_opt_1.c: Likewise.
* gcc.target/aarch64/erratas_opt_2.c: Likewise.
* gcc.target/aarch64/erratas_opt_3.c: Likewise.
* gcc.target/aarch64/erratas_opt_4.c: Likewise.
* gcc.target/aarch64/erratas_opt_5.c: Likewise.
* gcc.target/aarch64/erratas_opt_6.c: Likewise.
* gcc.target/aarch64/erratas_opt_7.c: Likewise.
* gcc.target/aarch64/erratas_opt_8.c: Likewise.
* gcc.target/aarch64/erratas_opt_9.c: Likewise.
* gcc.target/aarch64/erratas_opt_10.c: Likewise.
* gcc.target/aarch64/erratas_opt_11.c: Likewise.
* gcc.target/aarch64/erratas_opt_12.c: Likewise.
* gcc.target/aarch64/erratas_opt_13.c: Likewise.
* gcc.target/aarch64/erratas_opt_14.c: Likewise.
* gcc.target/aarch64/erratas_opt_15.c: Likewise.

18 files changed:
gcc/config.gcc
gcc/config/aarch64/aarch64-vxworks.h
gcc/testsuite/gcc.target/aarch64/erratas_opt_0.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_1.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_10.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_11.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_12.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_13.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_14.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_15.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_2.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_3.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_4.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_5.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_6.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_7.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_8.c
gcc/testsuite/gcc.target/aarch64/erratas_opt_9.c

index d62eb162934bf41380ae2403898472152ebbfe90..b1a1e955bda093154caf33729826c142e3a4e1c3 100644 (file)
@@ -1349,7 +1349,7 @@ aarch64-*-mingw*)
        tm_defines="${tm_defines} TARGET_AARCH64_MS_ABI=1"
        ;;
 aarch64*-wrs-vxworks*)
-        tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
+        tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h aarch64/aarch64-errata.h"
         tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
         tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-vxworks"
         ;;
index 6d2bd4eca2c72430e34c71ddf152018f85162388..a996ffc9139fcc71c4bd3bfbf1b340323d10c70d 100644 (file)
@@ -23,7 +23,8 @@ along with GCC; see the file COPYING3.  If not see
 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
 
 #undef LINK_SPEC
-#define LINK_SPEC VXWORKS_LINK_SPEC
+#define LINK_SPEC VXWORKS_LINK_SPEC \
+ AARCH64_ERRATA_LINK_SPEC
 
 #undef LIB_SPEC
 #define LIB_SPEC VXWORKS_LIB_SPEC
@@ -38,7 +39,10 @@ along with GCC; see the file COPYING3.  If not see
 #define CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
 
 #undef CC1_SPEC
-#define CC1_SPEC VXWORKS_CC1_SPEC
+#define CC1_SPEC VXWORKS_CC1_SPEC AARCH64_ERRATA_COMPILE_SPEC
+
+#undef CC1PLUS_SPEC
+#define CC1PLUS_SPEC VXWORKS_CC1_SPEC AARCH64_ERRATA_COMPILE_SPEC
 
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER
index 74d3cbc16872076f3ddb468e7ab764b60ffacbfa..14ad5823a45dbc1e66a9919f3f58b290e974a13e 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mcpu=neoverse-v1 -mfix-cortex-a53-835769 -###" } */
 
 int main()
index 6cf435103199ece975f5acde7612d0ebe3b383c0..6d4af751accc5a1fa485993a1711cc6c9afba3ac 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mfix-cortex-a53-835769 -###" } */
 
 int main()
index 9a63cf8f217e84117ec70c523e3b3b99aef16f78..751493ec12603cbc1ea33e8bcd67540fbe78cc06 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mfix-cortex-a53-843419 -mcpu=neoverse-v1 -###" } */
 
 int main()
index 844fefa2ed441e072877012bc47504732bdbdd7f..430dbf48c02be033dfbb9e8fae7229da6aa0af89 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-march=armv9-a -mfix-cortex-a53-843419 -###" } */
 
 int main()
index 818d249c80efa03b0fb6d63c12a37e9c5e87c701..8ffd54f3897337b2d9fc22595adc0e4c06bc3d8f 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mfix-cortex-a53-843419 -march=armv9-a -###" } */
 
 int main()
index 20a3be98f9efd760f0d83465c57beda6d6175e31..e027787c1ccdbb7297bf221f7d15fe22fb7c669a 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mcpu=cortex-a53 -mfix-cortex-a53-843419 -###" } */
 
 int main()
index 227f67762ad3861a1a61086ceb30a445b90bb75f..0c44aecc77f21ff34b0f2408c9b448efbc24cabd 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-march=armv8-a -mfix-cortex-a53-843419 -###" } */
 
 int main()
index 677edb5ff582c1e7318e7f9efe7ad4bfbeaff340..015c507a655d8c5a5386b6da8218b1f62b2c4f31 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mcpu=neoverse-v1 -march=armv8-a -mfix-cortex-a53-843419 -###" } */
 
 int main()
index 1d12413b2b3a349dd411c8276047c50130797f5b..4f222863db66c3bd5d5b6cbee3633f5bd283da4b 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mfix-cortex-a53-835769 -mcpu=neoverse-v1 -###" } */
 
 int main()
index ff29157b6f7325180983da78c9a266d73879d1b1..6d5ce4266706947f21e185395a174db5d64d8232 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-march=armv9-a -mfix-cortex-a53-835769 -###" } */
 
 int main()
index 69d62ddab8248db326cf5e8f3120d0e23ee778f2..29f994ce696f76421214fe7b87b83cfbc7c68697 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mfix-cortex-a53-835769 -march=armv9-a -###" } */
 
 int main()
index f2660a7e79dda3fafaf9a741992ef155615d5881..04b17062cefa97098c735928f09004fb46288131 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mcpu=cortex-a53 -mfix-cortex-a53-835769 -###" } */
 
 int main()
index 4bea52f1ec5bff577dc9b74ce5d1defd5464e03a..2c71c27f9571f34ee6976558940272234269a62d 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-march=armv8-a -mfix-cortex-a53-835769 -###" } */
 
 int main()
index 837857ed8a41060df2d59e358a5d19d58c58c300..bea4629af1e74f2977e5e81a3a812ee09bf8f9df 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mcpu=neoverse-v1 -march=armv8-a -mfix-cortex-a53-835769 -###" } */
 
 int main()
index 282b1215622b10db6cb07695dbdbc6e9c5e98316..27c2da0c44aeeb99998790be5084db7c7b6fcde3 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mcpu=neoverse-v1 -mfix-cortex-a53-843419 -###" } */
 
 int main()
index 25195c034bee79efec6c9cdf8859b507f5efc4f2..e930e59e3a07677573354427e14614868ee928a2 100644 (file)
@@ -1,5 +1,4 @@
 /* { dg-do link } */
-/* { dg-skip-if "uses vxlink" { *-*-vxworks* } } */
 /* { dg-additional-options "-mfix-cortex-a53-843419 -###" } */
 
 int main()