[Nasm-bugs] [Bug 3392801] New: -M does not generate proper dependencies

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Mon Jul 4 02:53:08 PDT 2022


https://bugzilla.nasm.us/show_bug.cgi?id=3392801

            Bug ID: 3392801
           Summary: -M does not generate proper dependencies
           Product: NASM
           Version: 2.15.xx
          Hardware: All
                OS: Linux
            Status: OPEN
          Severity: major
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: pahhur at googlemail.com
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: From OS distribution

Created attachment 411847
  --> https://bugzilla.nasm.us/attachment.cgi?id=411847&action=edit
Simplified sources to see the behaviour

Arch Linux 5.15.52-1-lts #1 SMP Sat, 02 Jul 2022 20:04:03 +0000 x86_64
GNU/Linux
NASM version 2.15.05 compiled on Sep 24 2020
Arch is up-to-date and NASM package are the latest available for the
distribution.
---

Hi all,

as described in 
https://forum.nasm.us/index.php?topic=2823.0
where unfortunately noone's answered yet:

---

I've been using nasm -M to generate Makefile dependencies
for a long time now.

We have the following situation

|->source->x.asm
|->include->macros.h

The source and the include directory are parallel
to one another (If you are in source, then ../include
is the correct include directory; if you are in include,
then ../source is the correct source directory). 
Neither of them is a link.

The source directory has a file x.asm, which %includes
the file macros.h, which is in the include directory.

nasm -felf64 -D__BITS__=64 -Ox -Dlinux -I../include x.asm

works fine.

The 
%include "macros.h"
is the first non-comment-non-empty-line in the asm file. 
(I attached a simplified version of that as sources.tar)
---

Former version of nasm, when called like

nasm -M -felf64 -D__BITS__=64 -Ox -Dlinux -I../include x.asm
or
nasm -M -felf64 -D__BITS__=64 -Ox -Dlinux -I../include/ x.asm

generated correct dependencies, most probably 
something like the following:

x.o : x.asm ../include/macros.h

and the make succeeded correctly with whatever was generated.


The current version (see above for the version number) generates

x.o : x.asm macros.h

i.e. it ignores the -I../include, and subsequent "make"s fail.


The point is: Is this a bug, or is there a new option
that I have to use from now on?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list