aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-18 13:13:50 -0700
committerJeff Law <jlaw@ventanamicro.com>2022-11-18 13:13:50 -0700
commit11543b27fe16d81ca5483ecb98ec7a5b2426e0c0 (patch)
tree23cf7c6e67f1321b7000b1e75783b330f81baea5 /gcc/doc/invoke.texi
parent59cc4da605e5cb8e31e9f1d54ef2b5ba47fc8f88 (diff)
libcpp: Avoid remapping filenames within directives
Code such as: #include __FILE__ can interact poorly with the *-prefix-map options when cross compiling. In general you're after to remap filenames for use in target context but the local paths should be used to find include files at compile time. Ingoring filename remapping for directives allows avoiding such failures. Fix this to improve such usage and then document this against file-prefix-map (referenced by the other *-prefix-map options) to make the behaviour clear and defined. libcpp/ChangeLog: * macro.cc (_cpp_builtin_macro_text): Don't remap filenames within directives. gcc/ChangeLog: * doc/invoke.texi: Document prefix-maps don't affect directives.
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 31d031cd25c..0f6a1833ef1 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2201,7 +2201,8 @@ any references to them in the result of the compilation as if the
files resided in directory @file{@var{new}} instead. Specifying this
option is equivalent to specifying all the individual
@option{-f*-prefix-map} options. This can be used to make reproducible
-builds that are location independent. See also
+builds that are location independent. Directories referenced by
+directives are not affected by these options. See also
@option{-fmacro-prefix-map}, @option{-fdebug-prefix-map} and
@option{-fprofile-prefix-map}.