In ldfile_open_command_file_1() name written to the dependency files is
the name as specified passed to the "INCLUDE" directive.
This is before include-path processing so the tracked dependency
location is most likely wrong.
Instead track the opened file at the point where the resolved path is
actually available, in try_open().
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
result = fopen (name, "r");
if (result != NULL)
- *sysrooted = is_sysrooted_pathname (name);
+ {
+ *sysrooted = is_sysrooted_pathname (name);
+ track_dependency_files (name);
+ }
if (verbose)
{
return;
}
- track_dependency_files (name);
-
lex_push_file (ldlex_input_stack, name, sysrooted);
lineno = 1;