> -----Original Message-----
> From: Christophe Lyon <christophe.l...@linaro.org>
> Sent: Friday, July 7, 2023 8:52 AM
> To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov <kyrylo.tkac...@arm.com>;
> Richard Earnshaw <richard.earns...@arm.com>
> Cc: Christophe Lyon <christophe.l...@linaro.org>
> Subject: [PATCH] testsuite: Add _link flavor for several arm_arch* and arm*
> effective-targets
> 
> 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.

I think this looks ok but...

> 
> 2023-07-07  Christophe Lyon  <christophe.l...@linaro.org>
> 
>       gcc/testsuite/
>       * lib/target-supports.exp (arm_*FUNC_link): New effective-targets.
> ---
>  gcc/testsuite/lib/target-supports.exp | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-
> supports.exp
> index c04db2be7f9..d33bc077418 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -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>

... why is arm_cde.h included here?

> +             INC
> +             int
> +             main (void)
> +             {
> +                 return 0;
> +             }
> +         } [add_options_for_FUNC ""]]
> +     }
> +
>       proc check_effective_target_FUNC_multilib { } {
>           if { ! [check_effective_target_FUNC_ok] } {
>               return 0;
> --
> 2.34.1

Reply via email to