From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 3313A3858D1E for ; Mon, 3 Jul 2023 11:07:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3313A3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-51d80d81d6eso5096202a12.1 for ; Mon, 03 Jul 2023 04:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688382463; x=1690974463; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=rJEDVzVss9VkfXMebUl3S9hnTyHaV9++NwEQ+K3wyGE=; b=chmAfsY2CmkAPx209Xs0CF1FLskHjNXmyUXChIgXEtnvyQavlG0CvBUVYALBVCipgU 3SaGmwBJw0NEvLkwlskFkNhiov0nCG0RS0QlsDSem58oBFHK01arLUqAi2nBJ2nsFSY7 PanrptZ40RkX+f3S5t1sgj6qVgtprQLRwkRTI964A7m0aUIVwWEoOcMXcxMhbco5mDqD 4UuWqsTwnAe/OSXFJ0KkwqG1nPHPuIo/M03u3uJGq710IrnnAWDVcSTM+o0Sh1hWe+C0 6zH6MjF9hmZgeIuVfAtPNEsV3+LVnN8G4KWs26F/rKVIywutLzuF8elAN/bt7FjQrSw9 u3YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688382463; x=1690974463; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rJEDVzVss9VkfXMebUl3S9hnTyHaV9++NwEQ+K3wyGE=; b=BTPGbYIjgizqyPJrmol0s5SG99NkSOoCZEzmgeOF+CUWmK9RkVp3Us9PqnOLa8eWyj 3A9nKanj8+SyLfzxqQiDFC+iWdocrBkB3BOLlia8a00Ayi4n2UxHSFVL5HeqAOhHViB7 8phH0aHL0BVjx8M7PAmbTKq6sB1+DBaS++UH1gaIk0lQMuuqyt08GMdUVCBzbHS8bss2 fhmPtizueqCfo/wi6KyF71f0XdPvz5CdKPuDWg2nciKe3VpdqihaF/5Az5iIG4tFxarP NgqPVDy7GmvNR+fgKHEZNn+5LzJ0zT7k/IwClTaIr+hMIWZPAtbVIwtcwCTj3Ylh0LTB N1mw== X-Gm-Message-State: ABy/qLbo2FTexnjA0Ut1LByAygv3NJtLs0mdcAXVM7HLAnXrusRJC+3f 7lb/wmjFqx2VKqXWTeV7mj4RmZu1u4jRrTiVm5gQwlHq/Hc= X-Google-Smtp-Source: APBJJlGtdbc1jxHzEA3KDHhxjyPuEBO0yiBPvEPmV2sc/EKC62OzUmTpRpV++jFPf1McymtC5RAK1N/omVtD1iwFcyA= X-Received: by 2002:a05:6402:1217:b0:51d:fa4e:49bb with SMTP id c23-20020a056402121700b0051dfa4e49bbmr5378201edw.7.1688382462664; Mon, 03 Jul 2023 04:07:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Costas Argyris Date: Mon, 3 Jul 2023 12:07:31 +0100 Message-ID: Subject: Re: [PATCH] gcc-ar: Handle response files properly [PR77576] To: gcc-patches@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000eea44c05ff932ce0" X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,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: --000000000000eea44c05ff932ce0 Content-Type: text/plain; charset="UTF-8" I should also add that for a rsp file that contains just "--version": gcc-ar @rsp fails without the patch (current problem) and successfully prints the version info with it. On Sat, 1 Jul 2023 at 22:45, Costas Argyris wrote: > Basically implementing what Andrew said in the PR: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576 > > If @file has been passed to gcc-ar, do the following: > > 1) Expand it to get an argv without any @files. > 2) Then apply the plugin modifications to argv. > 3) Create temporary response file. > 4) Put the modified argv in the temporary file. > 5) Call ar with @tmp. > 6) Delete the temporary response file. > --000000000000eea44c05ff932ce0--