On Wed, 6 Jan 2021 10:42:35 +0200
Roi Dayan <r...@nvidia.com> wrote:

> > 
> > I think that just adding an unnecessary -lm is more of a tidiness issue
> > than anything else. One way to avoid it is to split the -lm deps out
> > from util.c / json_print.c to like util_math.c / json_print_math.c. That
> > way they will be in an .o of their own, and won't be linked in unless
> > the binary in question needs the code. Then the binaries that do call it
> > can keep on linking in -lm like they did so far.
> > 
> > Thoughts?
> >   

Adding -lm to just some tools is not really required.
The linker will ignore the shared library if not used.

Reply via email to