Skip to content
Snippets Groups Projects
Commit 11543b27 authored by Richard Purdie's avatar Richard Purdie Committed by Jeff Law
Browse files

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.
parent 59cc4da6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment