From d58164e4d87854233564b59e76259b72e21507f6 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 1 Jun 2016 10:09:45 +0530 Subject: [PATCH] build: enforce linking with --no-undefined, add explicit -lpthread In investigating x86/sse2 issues in recent webrtc-audio-processing-0.2 release, I found that it was possible for libwebrtc_audio_processing to contain undefined symbols. Attached is a patch that addresses this: * adds -Wl,--no-undefined to libwebrtc_audio_processing_la_LDFLAGS * adds explicit -lpthread linkage (else, there are undefined references to pthread-related symbols) Signed-off-by: Arun Raghavan --- webrtc/modules/audio_processing/Makefile.am | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am index b685fb9..6a5c508 100644 --- a/webrtc/modules/audio_processing/Makefile.am +++ b/webrtc/modules/audio_processing/Makefile.am @@ -166,8 +166,11 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \ $(top_builddir)/webrtc/base/libbase.la \ $(top_builddir)/webrtc/system_wrappers/libsystem_wrappers.la \ $(top_builddir)/webrtc/common_audio/libcommon_audio.la \ - $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la -libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO) + $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \ + -lpthread +libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \ + -Wl,--no-undefined \ + -version-info $(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO) # FIXME: The MIPS optimisations need to be hooked up once we have the # autotools conditionals in place