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 EAAD33858CDA for ; Mon, 5 Sep 2022 15:02:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EAAD33858CDA 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 imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BAC0733D1E; Mon, 5 Sep 2022 15:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662390146; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UZwPOwTNgNROkEBNyzV61hZvIaSFUUWjpl7HN1YUnzU=; b=RrOipOaRCBTtVr6qjxPfjhpwpecgzyJgx/eVCj1uLATehenQz7GDEb164zDpqf+TnzY7fl hyNNc09/83WPiw1udfiCeAHCyKPbJ6wrcXy7nYx3L2PAg6d3iISuT2XwY5IclCbDjZQJzC +PWRSdnxuTqcD4MI+RROAOtWXAL7ctA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662390146; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UZwPOwTNgNROkEBNyzV61hZvIaSFUUWjpl7HN1YUnzU=; b=jIltqaonR1WfaxvsfGhhrEJkkOfohQykIYOGB+rMJC7MeYipxEcRB0GDYPGnFRNMC7gfPM xwZRPSIcKr2JNCAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9F7FD13A66; Mon, 5 Sep 2022 15:02:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SbbDJYIPFmNYTQAAMHmgww (envelope-from ); Mon, 05 Sep 2022 15:02:26 +0000 Message-ID: <820c4820-aca2-29f2-8727-11aa3913ae68@suse.de> Date: Mon, 5 Sep 2022 17:02:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PING] nvptx: forward '-v' command-line option to assembler, linker Content-Language: en-US To: Thomas Schwinge , Tobias Burnus , gcc-patches@gcc.gnu.org References: <874k185ak4.fsf@dem-tschwing-1.ger.mentorg.com> <871qw08orn.fsf@euler.schwinge.homeip.net> From: Tom de Vries In-Reply-To: <871qw08orn.fsf@euler.schwinge.homeip.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 6/7/22 17:41, Thomas Schwinge wrote: > Subject: > [PING] nvptx: forward '-v' command-line option to assembler, linker > From: > Thomas Schwinge > Date: > 6/7/22, 17:41 > > To: > Tobias Burnus , , "Tom > de Vries" > > > Hi! > > On 2022-05-30T09:06:21+0200, Tobias Burnus wrote: >> On 29.05.22 22:49, Thomas Schwinge wrote: >>> Not sure if that's what you had in mind, but what do you think about the >>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>> OK to push to GCC master branch (after merging >>> >>> "Put '-v' verbose output onto stderr instead of stdout")? >> I was mainly thinking of some way to have it available — which >> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >> nvptx-tools patch actually makes use of the '-v'.) > (Merged a week ago.) > >> If I understand your patch correctly, this patch now causes 'gcc -v' to >> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >> outputs a lot of lines and those lines can be helpful to understand what >> happens and what not. > ACK. > >> Tom, your thoughts on this? > Ping. > > > Grüße > Thomas > > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 > > > 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch > > From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 > From: Thomas Schwinge > Date: Sun, 29 May 2022 22:31:43 +0200 > Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker > > For example, for offloading compilation with '-save-temps -v', before vs. after > word-diff then looks like: > > [...] > [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s > {+Verifying sm_30 code with sm_35 code generation.+} > {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} > [...] > [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc > {+collect2 version 12.0.1 20220428 (experimental)+} > {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} > {+Linking ./a.xnvptx-none.mkoffload.o as 0+} > {+trying lib libc.a+} > {+trying lib libgcc.a+} > {+trying lib libgomp.a+} > {+Resolving abort+} > {+Resolving acc_on_device+} > {+Linking libgomp.a::oacc-init.o/ as 1+} > {+Linking libc.a::lib_a-abort.o/ as 2+} > [...] > > (This depends on > "Put '-v' verbose output onto stderr instead of stdout".) > Ack, I see that has been merged. The ASM_SPEC part LGTM. The LINK_SPEC part results looked very verbose to me at first glance, given that it prints info that with gnu ld we'd only see with -Wl,-trace. But I suppose that's more of a question of what we print with nvptx-none-ld -v. Still, I wonder, normally we don't pass -v to ld, and need -Wl,-v for that. So, any particular reason why we would do things differently for nvptx? Thanks, - Tom > gcc/ > * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. > --- > gcc/config/nvptx/nvptx.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h > index ed72c253191..b184f1d0150 100644 > --- a/gcc/config/nvptx/nvptx.h > +++ b/gcc/config/nvptx/nvptx.h > @@ -27,6 +27,13 @@ > > /* Run-time Target. */ > > +/* Assembler supports '-v' option; handle similar to > + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ > +#define ASM_SPEC "%{v}" > + > +/* Linker supports '-v' option. */ > +#define LINK_SPEC "%{v}" > + > #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" > > #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () > -- 2.25.1 > > Attachments: > > 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch 2.0 KB >