From patchwork Wed May 24 12:21:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pekka_Sepp=C3=A4nen?= X-Patchwork-Id: 1785697 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=kapsi.fi header.i=@kapsi.fi header.a=rsa-sha256 header.s=20161220 header.b=rcoYXyl1; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QR9KR3NKvz20Pb for ; Wed, 24 May 2023 22:21:47 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6911A3858418 for ; Wed, 24 May 2023 12:21:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:67c:1be8::25]) by sourceware.org (Postfix) with ESMTPS id C33C43858CDB for ; Wed, 24 May 2023 12:21:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C33C43858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.mail.kapsi.fi Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kapsi.fi DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Subject:Content-Transfer-Encoding:Content-Type:Message-ID:To: From:Date:MIME-Version:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=4ojjHWrwflTBlSNhZyWBXoZwHc/G2Ag8DR2WbtH2hto=; b=rcoYXyl11H/P6bHo+QDWIXWKAF PYW8hrBEYqrTxOUwYlrRCWpn6kLEwkyVoyQa0ZE3QXtK/X2Yg+89ZpGa1NnpO4wDXhgHZpPWPguCq B7HMLDIM0J6aRJsxDZzeDMRtneFPmTLsTpBU0W8TouUxI6+CruJDffChOIsDVzpoGosLDe/wQfJxr PYyJN9gIChdbLky1b16c29QqkGcU8X1Bl141nKFuLUkZPh5NhDuSS5Ci5f4vQIeLBIZ0vmn5u2Tv7 RbPR+/rkpQqaEhFe0S1jeGzv0mlHcv/3X/SgTi1LgHkPLNp2Aup2w8FwxXqnGEvbnZaNbvxJeXmci 4ajKNHWg==; Received: from [2001:67c:1be8::200] (helo=roundcube.kapsi.fi) by mail.kapsi.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q1nUZ-001l8y-5q for gcc-patches@gcc.gnu.org; Wed, 24 May 2023 15:21:23 +0300 MIME-Version: 1.0 Date: Wed, 24 May 2023 15:21:22 +0300 From: =?utf-8?q?Pekka_Sepp=C3=A4nen?= To: gcc-patches@gcc.gnu.org Message-ID: <76a71ea623f25a11b3e9bdeefcebe047@gcc.mail.kapsi.fi> X-Sender: pexu@gcc.mail.kapsi.fi X-SA-Exim-Connect-IP: 2001:67c:1be8::200 X-SA-Exim-Mail-From: pexu@gcc.mail.kapsi.fi X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Spam-Level: X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH] Use expandargv on gcc-ar [PR77576] X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on mail.kapsi.fi) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Call expandargv prior attempting to prepend a dash to the first argument. When using response files the first character is never a dash but an at-sign. PR gcc/77576 gcc/ChangeLog: * gcc-ar.cc (main): Call expandargv. --- gcc/gcc-ar.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/gcc-ar.cc b/gcc/gcc-ar.cc index 5e5b63e1988..2a1e99cace7 100644 --- a/gcc/gcc-ar.cc +++ b/gcc/gcc-ar.cc @@ -136,6 +136,8 @@ main (int ac, char **av) int exit_code = FATAL_EXIT_CODE; int i; + expandargv(&ac, &av); + setup_prefixes (av[0]); /* Not using getopt for now. */