]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Add _link flavor for several arm_arch* and arm* effective-targets
authorChristophe Lyon <christophe.lyon@linaro.org>
Fri, 7 Jul 2023 07:41:59 +0000 (07:41 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Mon, 10 Jul 2023 14:13:59 +0000 (14:13 +0000)
For arm targets, we generate many effective-targets with
check_effective_target_FUNC_multilib and
check_effective_target_arm_arch_FUNC_multilib which check if we can
link and execute a simple program with a given set of flags/multilibs.

In some cases however, it's possible to link but not to execute a
program, so this patch adds similar _link effective-targets which only
check if link succeeds.

The patch does not uupdate the documentation as it already lacks the
numerous existing related effective-targets.

2023-07-07  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/testsuite/
* lib/target-supports.exp (arm_*FUNC_link): New effective-targets.

gcc/testsuite/lib/target-supports.exp

index b16853d76df9d8af951c8f0dfd05ca4b1e32c143..33482b2fa9a92d2ea77642b1253d4b16e625e5f8 100644 (file)
@@ -5129,6 +5129,14 @@ foreach { armfunc armflag armdefs } {
            return "$flags FLAG"
        }
 
+        proc check_effective_target_arm_arch_FUNC_link { } {
+           return [check_no_compiler_messages arm_arch_FUNC_link executable {
+               #include <stdint.h>
+               int dummy;
+               int main (void) { return 0; }
+           } [add_options_for_arm_arch_FUNC ""]]
+       }
+
        proc check_effective_target_arm_arch_FUNC_multilib { } {
            return [check_runtime arm_arch_FUNC_multilib {
                int
@@ -5906,6 +5914,7 @@ proc add_options_for_arm_v8_2a_bf16_neon { flags } {
 #   arm_v8m_main_cde: Armv8-m CDE (Custom Datapath Extension).
 #   arm_v8m_main_cde_fp: Armv8-m CDE with FP registers.
 #   arm_v8_1m_main_cde_mve: Armv8.1-m CDE with MVE.
+#   arm_v8_1m_main_cde_mve_fp: Armv8.1-m CDE with MVE with FP support.
 # Usage:
 #   /* { dg-require-effective-target arm_v8m_main_cde_ok } */
 #   /* { dg-add-options arm_v8m_main_cde } */
@@ -5965,6 +5974,24 @@ foreach { armfunc armflag armdef arminc } {
            return "$flags $et_FUNC_flags"
        }
 
+        proc check_effective_target_FUNC_link { } {
+           if { ! [check_effective_target_FUNC_ok] } {
+               return 0;
+           }
+           return [check_no_compiler_messages FUNC_link executable {
+               #if !(DEF)
+               #error "DEF failed"
+               #endif
+               #include <arm_cde.h>
+               INC
+               int
+               main (void)
+               {
+                   return 0;
+               }
+           } [add_options_for_FUNC ""]]
+       }
+
        proc check_effective_target_FUNC_multilib { } {
            if { ! [check_effective_target_FUNC_ok] } {
                return 0;