[nasm:nasm-2.16.xx] BR 3392832: fix dependency list generation

nasm-bot for H. Peter Anvin hpa at zytor.com
Wed Oct 11 14:39:05 PDT 2023


Commit-ID:  03490692b0082fe16a1936a5774f4326a55075e6
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=03490692b0082fe16a1936a5774f4326a55075e6
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Wed, 11 Oct 2023 14:33:53 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Wed, 11 Oct 2023 14:35:49 -0700

BR 3392832: fix dependency list generation

The dependency list needs to be updated for all passes, not just the
last one. The dependency list is already uniquized, so it doesn't
cause problems with multiple entires.

The reasons it needs to be done for all passes is first of all that an
%include could be pass-dependent, and secondly that we only record a
dependency for an %include or %require for the first occurrence of
that file, when pathnames are resolved.

Reported-by <michael at mehlich@com>
Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 asm/nasm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/asm/nasm.c b/asm/nasm.c
index 76c70f6d..97d926fc 100644
--- a/asm/nasm.c
+++ b/asm/nasm.c
@@ -1712,7 +1712,7 @@ static void assemble_file(const char *fname, struct strlist *depend_list)
             location.known = true;
         ofmt->reset();
         switch_segment(ofmt->section(NULL, &globalbits));
-        pp_reset(fname, PP_NORMAL, pass_final() ? depend_list : NULL);
+        pp_reset(fname, PP_NORMAL, depend_list);
 
         globallineno = 0;
 


More information about the Nasm-commits mailing list