From patchwork Sat Jan 7 12:01:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Mor X-Patchwork-Id: 40381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1266597wrt; Sat, 7 Jan 2023 04:02:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXtdIXWpRfS6jXJ+SK918a9Za1UFlb1BAFn1XT5TYVR0NyPowyjNnZK8iTrY4jhxn8VHk13r X-Received: by 2002:a17:907:3e05:b0:84c:eca0:5f67 with SMTP id hp5-20020a1709073e0500b0084ceca05f67mr17618416ejc.54.1673092921378; Sat, 07 Jan 2023 04:02:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673092921; cv=none; d=google.com; s=arc-20160816; b=wZNRCOTIz44mDUUBfQNt7343WDouRWxrJ9M4tlxVWp9lRV6E6xO0WAJv7UyjuQjK3h Utx+xQOEymQqZDaqxaLPsYWIWnGwkXHavTCHZ7CFS4+tCeINnfh8s4ShcnkKCXt0/NZ4 HDUlznQM/rlfqf3apjUyFZiO8B5Oiwj5gPAcfOr6huC8Pt7uX3dD68u/AxzSyRA5Xum3 LT6cOrS9TbZ5En47PIdk42NQ0kUVBlM0YPTNvJBwbaOB5rEpBubJDkmp2bebfE6yz3Yw bQD0Tisme3U1OuBiqvHmBFISRVswvLMVTFLvMqu/uknTt+qbXW49jvvnBrmgePtNwHtX gRyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:to:subject :message-id:date:mime-version:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=pY0yUo1wsY06ruBBeT9eSuIrNVSVa0OhKzYWSehzh7k=; b=VL3yCOsZuXQDbxWVkiHtIXkCV6gD9ITMope7A0VO/mhJoyNCA73O3PTXQeC+lpeLBz YLEMPQJ/01NvEDQ1xcF47t6mmIx7/hVFjFHztlUea14TXktv+NlwiRrVgkiEMPsCZwHN gBKGh6s7JS2hiPeDwF5ZCjpEUwPXirEXj0AISgCuaquP01qKg/dYJyNpwRFNZuSYbOqZ FDzkwdZmsJfMvlc1KLErGpbYgKacOJijGD3VTU3V/pRXgalbSqt1SSDML2j5VtQwv8ek /iyF2nA7bCNk3xBXNx/4fyZOLtMPn3lVLStBCfZ7+pFX0gKRpaU3wK4zpuNL6Hhjl9d5 /W9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=HaX6MNGU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id dn1-20020a17090794c100b0084cd1f106bcsi4815344ejc.467.2023.01.07.04.02.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Jan 2023 04:02:01 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=HaX6MNGU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 301D9385841A for ; Sat, 7 Jan 2023 12:02:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 301D9385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673092920; bh=pY0yUo1wsY06ruBBeT9eSuIrNVSVa0OhKzYWSehzh7k=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=HaX6MNGUmBwdmy7pr5q1GmBJCLJXjKeg9boax+UrpmGE0hSfIYjTw/rVFKHwPMhWI KlTUAilGRoC5aEnNSRgs/1svpAMwyuukmulx6y1G9LgJolee22ZRkPWXMj8GAPWyLF Z7bc7ilgt6PiaBYxL6qMOnyQ7EZ9POBWgJvv5Hqw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id BF2A53858D39 for ; Sat, 7 Jan 2023 12:01:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF2A53858D39 Received: by mail-wm1-x333.google.com with SMTP id bi26-20020a05600c3d9a00b003d3404a89faso4743426wmb.1 for ; Sat, 07 Jan 2023 04:01:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wS5FFevFBwc1gxHf890DICw5P+ehkvuw39/hfidwEXo=; b=CRE5NYIZtySlHo49he6I9R0J44zXUTb/diPlD/HJ79QwSfz1n/hLGZ72uyRMOZnBic djRj20RodtOarMP1Ahp3z/MSdpv3FAhbGFMilu8GV/7N1kVR8hpn+OH9gKQwxnF1Xymm S2GddwcuX65p8MfVqP+p9XwGJgAxzUfxa6keF2BEKBHVwK43lz3NtOPs/tjWj60gfvm3 xi9JrfPuZNN6aVN0nmBsotVUF5GQfX4f4DniaQvgsVTUuWjPbJHM3WhV9haZtpzFnBU0 jNcD80YldCjAW4+g/jxXia8VrlguELJ1uqzf9Gfv2XLnU2a+WPDLB9yYr7fJBD08tWxM 216Q== X-Gm-Message-State: AFqh2krGDvqYi7QMvYTUkBfzHAvmGMvK8BJiGukpR8ed66i5MtoCVx4o WqatIMtAPuM29hGFmowoT3OMHo+lzxeTVvF5Vrh39HNKbZM= X-Received: by 2002:a05:600c:20c:b0:3b4:88ba:a74c with SMTP id 12-20020a05600c020c00b003b488baa74cmr3381989wmi.77.1673092876186; Sat, 07 Jan 2023 04:01:16 -0800 (PST) MIME-Version: 1.0 Date: Sat, 7 Jan 2023 14:01:05 +0200 Message-ID: Subject: [PATCH] gcc: fix gcc --help -v opertion with linker flags and input files [PR108328] To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, 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 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: , X-Patchwork-Original-From: Sagi Mor via Gcc-patches From: Sagi Mor Reply-To: Sagi Mor 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?1754365083160874698?= X-GMAIL-MSGID: =?utf-8?q?1754365083160874698?= PR gcc/108328 gcc/ChangeLog: * gcc/gcc.cc: print help once and only once --- gcc/gcc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/gcc.cc b/gcc/gcc.cc index d629ca5e424..bd468a6a254 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -5414,9 +5414,9 @@ process_command (unsigned int decoded_options_count, } /* Ensure we only invoke each subprocess once. */ - if (n_infiles == 0 - && (print_subprocess_help || print_help_list || print_version)) + if (print_subprocess_help || print_help_list || print_version) { + n_infiles = 0; /* Create a dummy input file, so that we can pass the help option on to the various sub-processes. */ add_infile ("help-dummy", "c");