Commit 76118f58 authored by Marvin Scholz's avatar Marvin Scholz

configure: Do not use -no-undefined with sanitizers on darwin

Using sanitizer and no-undefined will cause linker errors on darwin due
to undefined symbols of the sanitizer.

This is adapted from a patch by Filip Roséen.
parent 9264da84
......@@ -1136,6 +1136,12 @@ AC_CACHE_CHECK([if linker supports -z,defs], [ac_cv_ld_z_defs], [
])
AS_IF([test "${ac_cv_ld_z_defs}" = "no" -o "x$with_sanitizer" != xno], [VLC_RESTORE_FLAGS])
AM_COND_IF([HAVE_DARWIN], [], [
AS_IF([test "${with_sanitizer}" = "no"], [
AC_SUBST([LDFLAGS_no_undefined], [-no-undefined])
])
])
dnl Check for __attribute__((packed))
AC_CACHE_CHECK([for __attribute__((packed))],
[ac_cv_c_attribute_packed],
......
......@@ -60,7 +60,7 @@ libvlc_la_LIBADD = \
../src/libvlccore.la ../compat/libcompat.la $(LIBPTHREAD) $(LIBM)
libvlc_la_LDFLAGS = \
$(LDFLAGS_libvlc) \
-no-undefined \
$(LDFLAGS_no_undefined) \
-version-info 10:0:5 \
-export-symbols $(srcdir)/libvlc.sym
libvlc_la_DEPENDENCIES = libvlc.sym
......
......@@ -42,7 +42,7 @@ libvlc_pulse_la_CPPFLAGS = -DMODULE_STRING=\"pulse\"
libvlc_pulse_la_CFLAGS = $(AM_CFLAGS) $(PULSE_CFLAGS)
libvlc_pulse_la_LIBADD = $(PULSE_LIBS) $(LTLIBVLCCORE)
libvlc_pulse_la_LDFLAGS = \
-no-undefined \
$(LDFLAGS_no_undefined) \
-export-symbols-regex ^vlc_pa_ \
-version-info 0:0:0
libpulse_plugin_la_SOURCES = audio_output/pulse.c
......
......@@ -30,7 +30,7 @@ AM_LDFLAGS = \
-avoid-version -module \
-export-symbols-regex ^vlc_entry \
-shrext $(LIBEXT) \
-no-undefined \
$(LDFLAGS_no_undefined) \
$(top_builddir)/compat/libcompat.la $(LTLIBVLCCORE)
if HAVE_WIN32
AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo -Wc,-static
......
......@@ -5,7 +5,7 @@ libvlc_vdpau_la_CFLAGS = $(VDPAU_CFLAGS)
libvlc_vdpau_la_LIBADD = $(X_LIBS) $(X_PRE_LIBS) -lX11 \
$(LIBDL) $(LIBPTHREAD)
libvlc_vdpau_la_LDFLAGS = \
-no-undefined \
$(LDFLAGS_no_undefined) \
-export-symbols-regex ^vdp_ \
-version-info 0:0:0
......
......@@ -114,7 +114,7 @@ libvlc_xcb_events_la_SOURCES = \
libvlc_xcb_events_la_CPPFLAGS = -DMODULE_STRING=\"xcb\"
libvlc_xcb_events_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS)
libvlc_xcb_events_la_LDFLAGS = \
-no-undefined \
$(LDFLAGS_no_undefined) \
-export-symbols-regex ^vlc_xcb_ \
-version-info 0:0:0
libvlc_xcb_events_la_LIBADD = $(XCB_LIBS) $(LTLIBVLCCORE)
......
......@@ -462,7 +462,7 @@ endif
libvlccore_la_LDFLAGS = \
$(LDFLAGS_libvlccore) \
-no-undefined \
$(LDFLAGS_no_undefined) \
-export-symbols $(srcdir)/libvlccore.sym \
-version-info 8:0:0
libvlccore_la_DEPENDENCIES = libvlccore.sym
......
Markdown is supported
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