Commit 34ff6fa1 authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Sébastien Blin
Browse files

libring: Specify LDFLAGS for the shared library.

This avoids the error:

   ld: /home/mcournoyer/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib/libswscale.a(swscale.o): relocation R_X86_64_PC32 against symbol `ff_M24A' can not be used when making a shared object; recompile with -fPIC
   ld: final link failed: bad value

caused by the missing '-Wl,-Bsymbolic' linker directive (which is
documented as required by ffmpeg when a shared library is built
against a static ffmpeg object).

* src/Makefile.am (libring_la_LDFLAGS): Set to AM_LDFLAGS.
[HAVE_WIN32]: Append using the += operator.
[HAVE_OSX]: Likewise.
[HAVE_LINUX]: Remove; it was not necessary.

Change-Id: Id2af9ea5812b2d1fd3b4f7f893108bb94671ffc6
GitLab: jami-packaging#101
parent cdc7cadb
......@@ -90,19 +90,18 @@ libring_la_LIBADD += \
endif
endif
# XXX: It seems this should be the default value when otherwise left
# unspecified, but for some reason this is required otherwise the
# shared object fails to link against ffmpeg's libswscale.a.
libring_la_LDFLAGS = $(AM_LDFLAGS)
if HAVE_WIN32
libring_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -avoid-version
libring_la_LDFLAGS += -no-undefined -avoid-version
endif
if HAVE_OSX
#FIXME necessary for -lintl
libring_la_LDFLAGS = $(AM_LDFLAGS) -L/usr/local/opt/gettext/lib
endif
if HAVE_LINUX
#needed to compile the .so
libring_la_CXXFLAGS = $(AM_CXXFLAGS) -fPIC
libring_la_LDFLAGS += -L/usr/local/opt/gettext/lib
endif
libring_la_SOURCES = \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment