Skip to content

Commit

Permalink
Fix -lm.
Browse files Browse the repository at this point in the history
  • Loading branch information
JereLeppanen committed Aug 14, 2024
1 parent eae83ea commit 343892b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions platform/linux-dpdk/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ __LIB__libodp_dpdk_la_LIBADD += $(LIBCONFIG_LIBS)
__LIB__libodp_dpdk_la_LIBADD += $(DPDK_LIBS_LIBODP)
__LIB__libodp_dpdk_la_LIBADD += $(PTHREAD_LIBS)
__LIB__libodp_dpdk_la_LIBADD += $(TIMER_LIBS)
__LIB__libodp_dpdk_la_LIBADD += $(ML_LIBS)

CHECK_GLOBALS_REGEX = " (odp_|_odp_|_deprecated_odp_|miniz_|mz_|tdefl_|tinfl_|mp_hdlr_init_odp_pool_ops|__odr_asan)"

Expand Down
2 changes: 1 addition & 1 deletion platform/linux-dpdk/libodp-dpdk.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Description: The ODP packet processing engine
Version: @PKGCONFIG_VERSION@
Requires.private: libconfig
Libs: -L${libdir} -l@ODP_LIB_NAME@ @DPDK_LIBS_NON_ABI_COMPAT@ @ATOMIC_LIBS_NON_ABI_COMPAT@
Libs.private: @DPDK_LIBS_ABI_COMPAT@ @OPENSSL_STATIC_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread @ATOMIC_LIBS_ABI_COMPAT@
Libs.private: @DPDK_LIBS_ABI_COMPAT@ @OPENSSL_STATIC_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread @ATOMIC_LIBS_ABI_COMPAT@ @ML_LIBS@
Cflags: -I${includedir} @DPDK_CFLAGS@
2 changes: 1 addition & 1 deletion platform/linux-dpdk/m4/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ DPDK_CFLAGS="${DPDK_CFLAGS} -DALLOW_EXPERIMENTAL_API"
# after DPDK check.
ODP_ML

AS_VAR_APPEND([PLAT_DEP_LIBS], ["${ATOMIC_LIBS} ${LIBCONFIG_LIBS} ${OPENSSL_LIBS} ${DPDK_LIBS_LT} ${LIBCLI_LIBS}"])
AS_VAR_APPEND([PLAT_DEP_LIBS], ["${ATOMIC_LIBS} ${LIBCONFIG_LIBS} ${OPENSSL_LIBS} ${DPDK_LIBS_LT} ${LIBCLI_LIBS} ${ML_LIBS}"])

# Add text to the end of configure with platform specific settings.
# Make sure it's aligned same as other lines in configure.ac.
Expand Down
4 changes: 4 additions & 0 deletions platform/linux-dpdk/m4/odp_ml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ AC_CONFIG_COMMANDS_PRE([dnl
AM_CONDITIONAL([WITH_ML], [test x$ml_support = xyes])
])
# Even if ML is not enabled, -lm is needed by quantization.
ML_LIBS="-lm"
AC_SUBST([ML_LIBS])
]) # ODP_ML

0 comments on commit 343892b

Please sign in to comment.