public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Law <law@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3611] gcc: honour -ffile-prefix-map in ASM_MAP [PR93371]
Date: Wed,  2 Nov 2022 16:02:10 +0000 (GMT)	[thread overview]
Message-ID: <20221102160210.D26DA38582A6@sourceware.org> (raw)

https://gcc.gnu.org/g:abaa32c7384edef065c79741764bc112dd18f32d

commit r13-3611-gabaa32c7384edef065c79741764bc112dd18f32d
Author: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Date:   Wed Nov 2 10:01:22 2022 -0600

    gcc: honour -ffile-prefix-map in ASM_MAP [PR93371]
    
    -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.

Diff:
---
 gcc/gcc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index afb23cd07b0..98a239c8531 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -877,7 +877,7 @@ proper position among the other output files.  */
 #endif
 
 #ifdef HAVE_AS_DEBUG_PREFIX_MAP
-#define ASM_MAP " %{fdebug-prefix-map=*:--debug-prefix-map %*}"
+#define ASM_MAP " %{ffile-prefix-map=*:--debug-prefix-map %*} %{fdebug-prefix-map=*:--debug-prefix-map %*}"
 #else
 #define ASM_MAP ""
 #endif

                 reply	other threads:[~2022-11-02 16:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221102160210.D26DA38582A6@sourceware.org \
    --to=law@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).