summaryrefslogtreecommitdiff
path: root/data/ndk-build/gstreamer-1.0.mk
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-11-29 19:42:19 +1100
committerMatthew Waters <matthew@centricular.com>2018-11-30 14:08:03 +1100
commitd4d75a040656bf631caebf63296b37d0ce6db549 (patch)
treebca9991835b8a0d260b2c8b0514909987307b8d9 /data/ndk-build/gstreamer-1.0.mk
parentf98262d220b106e4cb23238b9ba57f6101377b38 (diff)
ndk-build: don't advertise symbols from non-explicitly linked libraries
Instead pass -Wl,exclude-libs,$lib for each library *NOT* mentioned explicitly on the command line so those symbols aren't placed in exported symbol tables. Fixes numerous linking errors in dependant libraries that are extremely likely to be unused directly. This does however mean that any symbols and libraries that are used need to be present in the command line explicitly using either GSTREAMER_EXTRA_DEPS (for pkg-config) or -l$lib arguments. Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/issues/52 Fixes https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/37
Diffstat (limited to 'data/ndk-build/gstreamer-1.0.mk')
-rw-r--r--data/ndk-build/gstreamer-1.0.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/data/ndk-build/gstreamer-1.0.mk b/data/ndk-build/gstreamer-1.0.mk
index 8f73c579..872d8cfb 100644
--- a/data/ndk-build/gstreamer-1.0.mk
+++ b/data/ndk-build/gstreamer-1.0.mk
@@ -82,6 +82,10 @@ GSTREAMER_ANDROID_C := $(GSTREAMER_BUILD_DIR)/$(GSTREAMER_ANDROID_MODU
GSTREAMER_ANDROID_C_IN := $(GSTREAMER_NDK_BUILD_PATH)/gstreamer_android-1.0.c.in
GSTREAMER_DEPS := $(GSTREAMER_EXTRA_DEPS) gstreamer-1.0
GSTREAMER_LD := -fuse-ld=gold$(EXE_SUFFIX) -Wl,-soname,lib$(GSTREAMER_ANDROID_MODULE_NAME).so
+# for setting the default GTlsDatabase
+ifeq ($(GSTREAMER_INCLUDE_CA_CERTIFICATES),yes)
+GSTREAMER_DEPS += gio-2.0
+endif
################################
# NDK Build Prebuilt library #
@@ -149,9 +153,9 @@ G_IO_MODULES_LOAD := $(foreach module, $(G_IO_MODULES), \
# link at least to gstreamer-1.0 in case the plugins list is empty
GSTREAMER_ANDROID_LIBS := $(call pkg-config-get-libs,$(GSTREAMER_DEPS))
GSTREAMER_ANDROID_LIBS += $(GSTREAMER_PLUGINS_LIBS) $(G_IO_MODULES_LIBS) -llog -lz
-GSTREAMER_ANDROID_WHOLE_AR := $(call pkg-config-get-libs-no-deps,$(GSTREAMER_DEPS))
+GSTREAMER_ANDROID_WHOLE_AR := $(call pkg-config-get-libs-no-deps,$(GSTREAMER_DEPS)) $(GSTREAMER_EXTRA_LIBS)
# Fix deps for giognutls
-GSTREAMER_ANDROID_LIBS := $(call fix-deps,-lgiognutls, -lhogweed)
+GSTREAMER_ANDROID_LIBS := $(call fix-deps,-lgiognutls, -lhogweed) $(GSTREAMER_EXTRA_LIBS)
GSTREAMER_ANDROID_CFLAGS := $(call pkg-config-get-includes,$(GSTREAMER_DEPS)) -I$(GSTREAMER_ROOT)/include
# In newer NDK, SYSROOT is replaced by SYSROOT_INC and SYSROOT_LINK, which