[PATCH] testsuite: Add support for Rust and Modula-2 effective target tests
Arthur Cohen
arthur.cohen@embecosm.com
Thu Dec 15 12:53:49 GMT 2022
Hi Jakub,
On 12/15/22 13:23, Jakub Jelinek wrote:
> Hi!
>
> This patch allows magic comments also for Rust and Modula-2
> for effective target tests etc. and fixes up the Assembly entry
> - it is a glob, so /* Assembly can match /whatever Assembly and
> not just /* Assembly.
>
> Tested on x86_64-linux with
> make check-g++ RUNTESTFLAGS=i386.exp=pr35513*
> and verifying it still uses *.S extension for the property_1_needed
> effective target test.
>
> Ok for trunk?
>
> 2022-12-15 Jakub Jelinek <jakub@redhat.com>
>
> * lib/target-supports.exp (check_compile): Add support for
> Rust and Modula-2. Use \* rather than * for /* comment for
> Assembly.
>
> --- gcc/testsuite/lib/target-supports.exp.jj 2022-11-30 10:29:42.217698938 +0100
> +++ gcc/testsuite/lib/target-supports.exp 2022-12-15 13:08:47.941221943 +0100
> @@ -36,7 +36,9 @@
> # "! Fortran" for Fortran code,
> # "/* ObjC", for ObjC
> # "// ObjC++" for ObjC++
> -# and "// Go" for Go
> +# "// Go" for Go
> +# "// Rust" for Rust
> +# and "(* Modula-2" for Modula-2
> # If the tool is ObjC/ObjC++ then we overide the extension to .m/.mm to
> # allow for ObjC/ObjC++ specific flags.
>
> @@ -58,13 +60,15 @@ proc check_compile {basename type conten
> set options ""
> }
> switch -glob -- $contents {
> - "*/* Assembly*" { set src ${basename}[pid].S }
> + "*/\* Assembly*" { set src ${basename}[pid].S }
> "*! Fortran*" { set src ${basename}[pid].f90 }
> "*// C++*" { set src ${basename}[pid].cc }
> "*// D*" { set src ${basename}[pid].d }
> "*// ObjC++*" { set src ${basename}[pid].mm }
> "*/* ObjC*" { set src ${basename}[pid].m }
> "*// Go*" { set src ${basename}[pid].go }
> + "*// Rust*" { set src ${basename}[pid].rs }
> + "*(\* Modula-2*" { set src ${basename}[pid].mod }
> default {
> switch -- $tool {
> "objc" { set src ${basename}[pid].m }
>
> Jakub
>
LGTM :)
Thank you,
Arthur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x1B3465B044AD9C65.asc
Type: application/pgp-keys
Size: 3143 bytes
Desc: OpenPGP public key
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20221215/f66bd401/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20221215/f66bd401/attachment.sig>
More information about the Gcc-patches
mailing list