Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-06 4:24 PM, Petr Machata wrote: Roi Dayan writes: On 2021-01-06 3:16 PM, Petr Machata wrote: Regarding the publishing, the _jw reference can be changed to a call to is_json_context(), which does the same thing. Then _jw can stay private in json_print.c. Exposing an _IS_JSON_CON

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Petr Machata
Stephen Hemminger writes: > On Wed, 6 Jan 2021 10:42:35 +0200 > Roi Dayan 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 /

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Stephen Hemminger
On Wed, 6 Jan 2021 10:42:35 +0200 Roi Dayan 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 wi

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Petr Machata
Roi Dayan writes: > On 2021-01-06 3:16 PM, Petr Machata wrote: >> Regarding the publishing, the _jw reference can be changed to a call to >> is_json_context(), which does the same thing. Then _jw can stay private >> in json_print.c. >> Exposing an _IS_JSON_CONTEXT / _IS_FP_CONTEXT might be odd

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-06 3:16 PM, Petr Machata wrote: Roi Dayan writes: On 2021-01-06 10:42 AM, Roi Dayan wrote: On 2021-01-04 6:07 PM, Petr Machata 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

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Petr Machata
Roi Dayan writes: > On 2021-01-06 10:42 AM, Roi Dayan wrote: >> >> On 2021-01-04 6:07 PM, Petr Machata 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

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-06 10:42 AM, Roi Dayan wrote: On 2021-01-04 6:07 PM, Petr Machata wrote: Roi Dayan writes: Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing the math lib. Move the link flag from tc makefile to the main makefile. Hmm,

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-04 6:07 PM, Petr Machata wrote: Roi Dayan writes: Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing the math lib. Move the link flag from tc makefile to the main makefile. Hmm, yeah, it gets optimized out on x86-64. The i

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-04 Thread Petr Machata
Roi Dayan writes: > Since moving get_rate() and get_size() from tc to lib, on some > systems we fail to link because of missing the math lib. > Move the link flag from tc makefile to the main makefile. Hmm, yeah, it gets optimized out on x86-64. The issue is reproducible on any platform with -

[PATCH iproute2] build: Fix link errors on some systems

2020-12-30 Thread Roi Dayan
Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing the math lib. Move the link flag from tc makefile to the main makefile. ../lib/libutil.a(utils.o): In function `get_rate': utils.c:(.text+0x10dc): undefined reference to `floor' ../lib/libutil