From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 188383858D32 for ; Mon, 17 Oct 2022 10:00:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 188383858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rasmusvillemoes.dk Received: by mail-lf1-x132.google.com with SMTP id o12so8214704lfq.9 for ; Mon, 17 Oct 2022 03:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4YZulWPTok8AkWcATV3ObMG2XImomcWQnMrDUxOXk/8=; b=HI48E5dTG1y/Aeuetls4DIkx+tP/fXbpVAx0LGWEHh26w2IG4NuY49BYTr75Xt1dOs Bndmh4xMHNij9IoN6Bdw65zv12z3UlKcxlT6d3C6pI6FZlhFDZsHG9vGa36aQBm7fl0z g0uioVCNdvO4r9/GgvBZJrsNOnr2cnx17nNXQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4YZulWPTok8AkWcATV3ObMG2XImomcWQnMrDUxOXk/8=; b=CqHJCHotyu2GruJt9x5nNDsD7Fxcdz8+HVzJqlTjtMU5OUZxNGoIl/QRDZ+Esipp0X 6VkgrpxjrNNPJJsW2WcOftQdMsGn06UmzdGqYr5wT5IOeroPsJUJlKtqlFoOo8EM5orl 2s+xHYHcWWcqYij3s4CVFwtCx1iqmOGxSK4dWrIoVeU2kDR2hGmYhy+kYEuOhlW5KanK Mj9bzncaNUlsHS2EAsZsGp9W54tImwu2lW1D6nKSxFKYT3OcNGetUnGTQvt+fcs+XBRV 3327fPLu6Amr2t69iSB5Jyt+8Lz3QtEnxyAlh4wy52Mq1lXKqY8Lm0ov8t7TxCm6JSiD 8osg== X-Gm-Message-State: ACrzQf0leHKYs0gn2jLNpLDVnmxM7Xxagu/nJJf/wPVzj8OW5aWBQ4Pk EsboaTi0eNDkkWeZdTEJ2p3tIRvBkIlP8+qO X-Google-Smtp-Source: AMsMyM5OGEE7LyGiZ79b4LzRN2rmxGZ5GIPpXu/4IaH47RbHd3DpDReuGv88oXFs1oWQ7a19sNfNRA== X-Received: by 2002:a05:6512:33d1:b0:4a2:119e:1887 with SMTP id d17-20020a05651233d100b004a2119e1887mr3568066lfg.85.1666000823136; Mon, 17 Oct 2022 03:00:23 -0700 (PDT) Received: from [172.16.11.74] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id r1-20020ac25f81000000b0048a934168c0sm1366517lfe.35.2022.10.17.03.00.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Oct 2022 03:00:22 -0700 (PDT) Message-ID: <3a36b694-348b-05d1-b3c9-699c627aee20@rasmusvillemoes.dk> Date: Mon, 17 Oct 2022 12:00:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] gcc: honour -ffile-prefix-map in ASM_MAP [PR93371] Content-Language: en-US From: Rasmus Villemoes To: gcc-patches@gcc.gnu.org Cc: Vagrant Cascadian , Jonathan Wakely , Jakub Jelinek , Joseph Myers , Jeff Law References: <20220829092917.477788-1-rv@rasmusvillemoes.dk> <49ad2c54-f179-3ef2-a0ce-85ec842da416@rasmusvillemoes.dk> In-Reply-To: <49ad2c54-f179-3ef2-a0ce-85ec842da416@rasmusvillemoes.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 List-Id: On 27/09/2022 08.54, Rasmus Villemoes wrote: > On 12/09/2022 11.46, Rasmus Villemoes wrote: >> On 29/08/2022 11.29, Rasmus Villemoes wrote: >>> -ffile-prefix-map is supposed to be a superset of -fmacro-prefix-map >>> and -fdebug-prefix-map. However, when building .S or .s files, gas is >>> not called with the appropriate --debug-prefix-map option when >>> -ffile-prefix-map is used. >>> >>> While the user can specify -fdebug-prefix-map when building assembly >>> files via gcc, it's more ergonomic to also support -ffile-prefix-map; >>> especially since for .S files that could contain the __FILE__ macro, >>> one would then also have to specify -fmacro-prefix-map. >>> >>> gcc: >>> PR driver/93371 >>> * gcc.cc (ASM_MAP): Honour -ffile-prefix-map. >>> --- >>> >>> I've tested that this works as expected, both by looking at how gas is >>> now invoked, and by running 'strings' on the generated .o file. But I >>> don't know how to add something to the testsuite for this. >> >> Is this ok for trunk? If so, how about older maintained branches? >> >> And does anyone have ideas for how I could add a test case? > > ping. > ping^2