bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22843] New: Provide dependency information from the linker simil


From: jpakkane at gmail dot com
Subject: [Bug ld/22843] New: Provide dependency information from the linker similar to the compiler
Date: Tue, 13 Feb 2018 19:40:59 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22843

            Bug ID: 22843
           Summary: Provide dependency information from the linker similar
                    to the compiler
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: jpakkane at gmail dot com
  Target Milestone: ---

The -M flag and its like is very useful for reliable dependencies when
compiling. It would be great if the same would work also when linking.

The use case is the following. Suppose you build a project with a dependency
that comes in via pkg-config. The eventual link line looks like this:

gcc -o final_exe source.o -L/path/to/my/place -L/path/to/somewhere/else -lmydep

It is very difficult to tell where the dependency library will be picked up
from. If the user updates any library by doing a "make/ninja install" from the
dependency file, then it is hard to know that the dependency libraries have
changed and thus require a rebuild. (usually doing an install updates headers,
which _do_ trigger a rebuild but some systems only overwrite installed files if
they have changed so looking only at header files is not reliable).

If ld supported generating dependency files like gcc with -M does for source
compilations, this problem would go away because running make/ninja would
automatically detect changes in system directories.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]