From ac2f9a6e63416e565019fe401d3c09e71344a6be Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Wed, 13 Apr 2022 03:20:53 +0300 Subject: [PATCH] [mod_avmd] Fix underlinking When building with -Wl,--no-undefined an error occured: DEBUG: make[4]: Entering directory '/builddir/build/BUILD/freeswitch-1.10.7.-release/src/mod/applications/mod_avmd' DEBUG: CC mod_avmd_la-mod_avmd.lo DEBUG: CC mod_avmd_la-avmd_buffer.lo DEBUG: CC mod_avmd_la-avmd_desa2_tweaked.lo DEBUG: CC mod_avmd_la-avmd_fast_acosf.lo DEBUG: CCLD mod_avmd.la DEBUG: /usr/bin/aarch64-rosa-linux-gnu-ld: .libs/mod_avmd_la-mod_avmd.o: in function `avmd_decision_amplitude': DEBUG: /builddir/build/BUILD/freeswitch-1.10.7.-release/src/mod/applications/mod_avmd/mod_avmd.c:1928: undefined reference to `sqrt' DEBUG: /usr/bin/aarch64-rosa-linux-gnu-ld: .libs/mod_avmd_la-mod_avmd.o: in function `avmd_decision_freq': DEBUG: /builddir/build/BUILD/freeswitch-1.10.7.-release/src/mod/applications/mod_avmd/mod_avmd.c:1947: undefined reference to `sqrt' DEBUG: /usr/bin/aarch64-rosa-linux-gnu-ld: .libs/mod_avmd_la-mod_avmd.o: in function `avmd_process_sample': DEBUG: /builddir/build/BUILD/freeswitch-1.10.7.-release/src/mod/applications/mod_avmd/mod_avmd.c:2207: undefined reference to `acos' DEBUG: /usr/bin/aarch64-rosa-linux-gnu-ld: .libs/mod_avmd_la-avmd_desa2_tweaked.o: in function `avmd_desa2_tweaked': DEBUG: /builddir/build/BUILD/freeswitch-1.10.7.-release/src/mod/applications/mod_avmd/avmd_desa2_tweaked.c:69: undefined reference to `sqrt' DEBUG: /usr/bin/aarch64-rosa-linux-gnu-ld: .libs/mod_avmd_la-avmd_fast_acosf.o: in function `compute_table': DEBUG: /builddir/build/BUILD/freeswitch-1.10.7.-release/src/mod/applications/mod_avmd/avmd_fast_acosf.c:116: undefined reference to `acosf' DEBUG: collect2: error: ld returned 1 exit status --- src/mod/applications/mod_avmd/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/applications/mod_avmd/Makefile.am b/src/mod/applications/mod_avmd/Makefile.am index 885cb6be3c..3b68856523 100644 --- a/src/mod/applications/mod_avmd/Makefile.am +++ b/src/mod/applications/mod_avmd/Makefile.am @@ -4,5 +4,5 @@ MODNAME=mod_avmd mod_LTLIBRARIES = mod_avmd.la mod_avmd_la_SOURCES = mod_avmd.c avmd_buffer.c avmd_desa2_tweaked.c avmd_fast_acosf.c mod_avmd_la_CFLAGS = $(AM_CFLAGS) $(AM_MOD_AVMD_CXXFLAGS) -mod_avmd_la_LIBADD = $(switch_builddir)/libfreeswitch.la +mod_avmd_la_LIBADD = $(switch_builddir)/libfreeswitch.la -lm mod_avmd_la_LDFLAGS = -avoid-version -module -no-undefined -shared