]> Git Repo - linux.git/commitdiff
samples: bpf: Fix linking xdp_router_ipv4 after migration
authorAlexander Lobakin <[email protected]>
Mon, 4 Apr 2022 11:54:51 +0000 (13:54 +0200)
committerAndrii Nakryiko <[email protected]>
Mon, 4 Apr 2022 21:45:06 +0000 (14:45 -0700)
Users of the xdp_sample_user infra should be explicitly linked
with the standard math library (`-lm`). Otherwise, the following
happens:

/usr/bin/ld: xdp_sample_user.c:(.text+0x59fc): undefined reference to `ceil'
/usr/bin/ld: xdp_sample_user.c:(.text+0x5a0d): undefined reference to `ceil'
/usr/bin/ld: xdp_sample_user.c:(.text+0x5adc): undefined reference to `floor'
/usr/bin/ld: xdp_sample_user.c:(.text+0x5b01): undefined reference to `ceil'
/usr/bin/ld: xdp_sample_user.c:(.text+0x5c1e): undefined reference to `floor'
/usr/bin/ld: xdp_sample_user.c:(.text+0x5c43): undefined reference to `ceil
[...]

That happened previously, so there's a block of linkage flags in the
Makefile. xdp_router_ipv4 has been transferred to this infra quite
recently, but hasn't been added to it. Fix.

Fixes: 85bf1f51691c ("samples: bpf: Convert xdp_router_ipv4 to XDP samples helper")
Signed-off-by: Alexander Lobakin <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
samples/bpf/Makefile

index b4fa0e69aa14f943239860d9124be78eefb48f11..342a41a10356114466220a69616a2a3dc18ea087 100644 (file)
@@ -219,6 +219,7 @@ TPROGLDLIBS_xdp_redirect    += -lm
 TPROGLDLIBS_xdp_redirect_cpu   += -lm
 TPROGLDLIBS_xdp_redirect_map   += -lm
 TPROGLDLIBS_xdp_redirect_map_multi += -lm
+TPROGLDLIBS_xdp_router_ipv4    += -lm
 TPROGLDLIBS_tracex4            += -lrt
 TPROGLDLIBS_trace_output       += -lrt
 TPROGLDLIBS_map_perf_test      += -lrt
This page took 0.062068 seconds and 4 git commands to generate.