From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 8DAC5388C5D8; Thu, 15 Dec 2022 12:48:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8DAC5388C5D8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 7F68221D74; Thu, 15 Dec 2022 12:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1671108486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fvAYT9rn7VYjBb/KtDGAaEOPo/tOSNHFhF7Flf//kao=; b=U1T/yTJ9Ae1+rsXnQkvvs1/gMBC23voB1ouk4dgbryLBuqdZ9eWAX7VWtJkaX7wQ9hZyzX 2kkLPVIDR/J4PxXbOtyyj/RmZ1zY8N/mSqx9FtgJcLaW3xoBmgqoTkRYUfwL2HApdfHmot HOQMFs9qmAcqQEVzeMBsprZ9nuCeTRY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1671108486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fvAYT9rn7VYjBb/KtDGAaEOPo/tOSNHFhF7Flf//kao=; b=mWuDGz61TEtr9g8gpt9AisNy0zJVzLti8uMOjKDsFPA5jHDwST8jc3eACAuE8mK81ROKME K8qCFK5p7KbASbAw== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 74F902C141; Thu, 15 Dec 2022 12:48:06 +0000 (UTC) Date: Thu, 15 Dec 2022 12:48:06 +0000 (UTC) From: Richard Biener To: Jakub Jelinek cc: Arthur Cohen , Gaius Mulley , gcc-patches@gcc.gnu.org, gcc-rust@gcc.gnu.org Subject: Re: [PATCH] testsuite: Add support for Rust and Modula-2 effective target tests In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 15 Dec 2022, 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? OK. Thanks, Richard. > 2022-12-15 Jakub Jelinek > > * 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 > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)