Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -90,19 +90,18 @@ libring_la_LIBADD += \ ...@@ -90,19 +90,18 @@ libring_la_LIBADD += \
endif endif
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 if HAVE_WIN32
libring_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -avoid-version libring_la_LDFLAGS += -no-undefined -avoid-version
endif endif
if HAVE_OSX if HAVE_OSX
#FIXME necessary for -lintl #FIXME necessary for -lintl
libring_la_LDFLAGS = $(AM_LDFLAGS) -L/usr/local/opt/gettext/lib libring_la_LDFLAGS += -L/usr/local/opt/gettext/lib
endif
if HAVE_LINUX
#needed to compile the .so
libring_la_CXXFLAGS = $(AM_CXXFLAGS) -fPIC
endif endif
libring_la_SOURCES = \ libring_la_SOURCES = \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment