aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.cc
diff options
context:
space:
mode:
authorRasmus Villemoes <rv@rasmusvillemoes.dk>2022-11-02 10:01:22 -0600
committerJeff Law <jlaw@ventanamicro.com>2022-11-02 10:01:22 -0600
commitabaa32c7384edef065c79741764bc112dd18f32d (patch)
tree0b4552353711f4e5047fe7b61f5f3f9da7f234f7 /gcc/gcc.cc
parent58511b3fc035f7fe77c3403f7b99de3a795a7964 (diff)
downloadgcc-abaa32c7384edef065c79741764bc112dd18f32d.zip
gcc-abaa32c7384edef065c79741764bc112dd18f32d.tar.gz
gcc-abaa32c7384edef065c79741764bc112dd18f32d.tar.bz2
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.
Diffstat (limited to 'gcc/gcc.cc')
-rw-r--r--gcc/gcc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index afb23cd..98a239c 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