From: Martin S. <ma...@ma...> - 2017-08-08 13:07:01
|
This fixes the dependency listings as generated with -MD (if assembling runs in multiple passes?). https://bugzilla.nasm.us/show_bug.cgi?id=3392420 Signed-off-by: Martin Storsjö <ma...@ma...> --- Resending with the signed-off-by. --- asm/preproc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/asm/preproc.c b/asm/preproc.c index 0d0e1040..94e9a798 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -1574,6 +1574,14 @@ static FILE *inc_fopen(const char *file, hp = hash_find(&FileHash, file, &hi); if (hp) { path = *hp; + if (path || omode != INC_NEEDED) { + const char *name = path ? path : file; + size_t name_len = strlen(name); + sl = nasm_malloc(name_len + sizeof sl->next); + memcpy(sl->str, name, name_len+1); + sl->next = NULL; + nasm_add_to_strlist(dhead, sl); + } } else { /* Need to do the actual path search */ size_t file_len; -- 2.11.0 (Apple Git-81) |