From patchwork Tue Aug 30 13:44:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 839 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp1840756wro; Tue, 30 Aug 2022 06:45:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR4tuD/tAkrl3/yV5KQi11eo0NG+yvgzjQ1CPqgH6CHT9JqWHFtGjay1IIzdKfdmTX8ZwETJ X-Received: by 2002:a17:907:7678:b0:730:e1ad:b128 with SMTP id kk24-20020a170907767800b00730e1adb128mr17671415ejc.67.1661867152869; Tue, 30 Aug 2022 06:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661867152; cv=none; d=google.com; s=arc-20160816; b=mhZVwZRsAFRu0zsWDLBv0PtRjx6n9a458FzgZ2tKdK7hDD49S8f5U54E/Y5vLDJOFn iR/jTJyG2RsZFdWMPa30pVnVmXsIkiXDRgi53RYtp1t6hxUCMIrdXR6TKZvMwrlBgQRn xjKndlbxuIo0RwQHTfcDiuOvPXsjpkuueWWtdta7D95ulwU/6lazYEERIsqMX73qaC4X CpggzJYCvJu2ghOY4pRUFZlZhOWxaolwxq83D6Y5SmhJOuPzGETt1al0KIrxlMDDuVYe V1Mc25WwzW0kFvF8CkfwNpWQ5oMGZrCOU69apN+XazEWBnYDpcvmvSkzDARJa3h7Qha7 1vSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=wEDOPTa8q8pwKWRqwo4yM5KG2714wk3UQ0AZ4op6sek=; b=KKSxZLy3fcVyTZKXEVmCqV3pBA4qIrPYWz2X6GSxdO0y3mT79Ox/EOnEbsosQB/p7g wE7vAoTA1PVuBATpeXZrfG3DQ5KIs/8LkDZ87f/m0L4rKz04jRG/N6aYfWsNgdwEXYZ3 ejb4RupSTgK4CUqcwsSedx8bSvAR8uk8FTUGJ8n4m/2Q4zbZKpVS3Eq5QL7lCegORC6a kXHGdi1pCw+cITwTui/6KSXv4/OjjLRg0u49cc4fNW5fjytoBjI6nPy4SiwIdFFXMaMP oirHqLznlXy9VtHin90+xguFS2MUJO4egBMq6+/UwdSyRN0OgVGLjblWLzmWIK0iR5SE 6bKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id gt37-20020a1709072da500b00718bf486a1csi1503791ejc.782.2022.08.30.06.45.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 06:45:52 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9DA553AA8436 for ; Tue, 30 Aug 2022 13:45:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 75FA8382F0A7 for ; Tue, 30 Aug 2022 13:44:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 75FA8382F0A7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,275,1654588800"; d="scan'208,223";a="82248862" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 30 Aug 2022 05:44:34 -0800 IronPort-SDR: enXn2Wq3xCEYAjJ9pAZWpoM96p2LMryMkdJOaUziZe/zVoe7PqoFyWFfXNXAdmCpgBoXBpkHqa PpkQYPjqUW3tiAy/YstjU24xnozfZZw3M7sva9eBQMWi01lyWeIrkB7EPvqWlS278545MTqRaq mFsd5YD5WtWtaS+Unp2KkJHkKwnhGX8y9g3C0hZZ8gXukDawJfoGGEhjBDZ/zzocSt5lzZiUfJ 3eXp47dbHWjqFc5cSIYIz+Tt7NXG/lZ2nrDwwuuKr1+3sqyhpPuzgkqPaRbBH1mL7nzrks5OLT 3hU= From: Thomas Schwinge To: Tom de Vries , Subject: [PING^8] nvptx: forward '-v' command-line option to assembler, linker In-Reply-To: <87mtc4p6hc.fsf@dem-tschwing-1.ger.mentorg.com> References: <874k185ak4.fsf@dem-tschwing-1.ger.mentorg.com> <871qw08orn.fsf@euler.schwinge.homeip.net> <874jzv61xt.fsf@euler.schwinge.homeip.net> <878rox4d70.fsf@euler.schwinge.homeip.net> <87y1worm17.fsf@dem-tschwing-1.ger.mentorg.com> <875yji36ap.fsf@dem-tschwing-1.ger.mentorg.com> <87k07l18nc.fsf@dem-tschwing-1.ger.mentorg.com> <87mtc4p6hc.fsf@dem-tschwing-1.ger.mentorg.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Tue, 30 Aug 2022 15:44:27 +0200 Message-ID: <87tu5tongk.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1738875719795124845?= X-GMAIL-MSGID: =?utf-8?q?1742594011357228219?= Hi Tom! Ping. Grüße Thomas On 2022-08-16T17:12:47+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-08-06T21:20:23+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-07-27T17:48:46+0200, I wrote: >>> Hi Tom! >>> >>> Ping. >>> >>> >>> Grüße >>> Thomas >>> >>> >>> On 2022-07-20T14:44:36+0200, I wrote: >>>> Hi Tom! >>>> >>>> Ping. >>>> >>>> >>>> Grüße >>>> Thomas >>>> >>>> >>>> On 2022-07-13T10:41:23+0200, I wrote: >>>>> Hi Tom! >>>>> >>>>> Ping. >>>>> >>>>> >>>>> Grüße >>>>> Thomas >>>>> >>>>> >>>>> On 2022-07-05T16:58:54+0200, I wrote: >>>>>> Hi Tom! >>>>>> >>>>>> Ping. >>>>>> >>>>>> >>>>>> Grüße >>>>>> Thomas >>>>>> >>>>>> >>>>>> On 2022-06-07T17:41:16+0200, I wrote: >>>>>>> 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 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".) 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