public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3611] gcc: honour -ffile-prefix-map in ASM_MAP [PR93371]
@ 2022-11-02 16:02 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2022-11-02 16:02 UTC (permalink / raw)
  To: gcc-cvs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-02 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 16:02 [gcc r13-3611] gcc: honour -ffile-prefix-map in ASM_MAP [PR93371] Jeff Law

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).