qt5base: fix plugin loading
[feed/video.git] / frameworks / qt5base / Makefile
index c0c08d1d488f99f68993e48b57df117d07882a88..0a70ee04d4498d2c4d8096dc2c3fcfd297a237c2 100644 (file)
@@ -6,7 +6,6 @@
 #
 
 # TODO / known bugs:
-# - plugins don't work when sstrip is used for stripping
 # - only framebuffer (linuxfb) support for now, XBC/DirectFB to come - thus no GL thus no qtquick2 / QML2, as it has a hard dependency on GL
 # - host_build functionality seems to be broken - qmake doesn't switch to the host toolchain (linux-g++) when host_build gets invoked
 
@@ -40,6 +39,22 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
        CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
 
+# Do not use sstrip for QT5. When sstrip is used the QT5 plugin loading does
+# not work, because of QT''s internal elf parser, see
+# https://bugreports.qt.io/browse/QTBUG-52567
+# Use the code from the gcc package to use strip instaed.
+ifneq ($(CONFIG_USE_SSTRIP),)
+  STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
+  RSTRIP:= \
+    export CROSS="$(TARGET_CROSS)" \
+               $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
+               $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
+    NM="$(TARGET_CROSS)nm" \
+    STRIP="$(STRIP)" \
+    STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \
+    $(SCRIPT_DIR)/rstrip.sh
+endif
+
 define Package/qt5base/Default
   SECTION:=video-frameworks
   CATEGORY:=Video
@@ -65,7 +80,7 @@ endef
 define Package/qt5base-core
   $(call Package/qt5base/Default)
   TITLE+=core
-  DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt
+  DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt $(ICONV_DEPENDS)
 endef
 
 define Package/qt5base-gui
@@ -259,8 +274,17 @@ define Build/Configure
                        -shared \
                        -largefile \
                        -accessibility \
-                       $(if $(CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite),-system-sqlite,-no-sql-sqlite2) \
+                       $(if $(CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite),-system-sqlite,-no-sql-sqlite) \
+                       -no-sql-db2 \
+                       -no-sql-ibase \
+                       -no-sql-mysql \
+                       -no-sql-oci \
+                       -no-sql-odbc \
+                       -no-sql-psql \
+                       -no-sql-sqlite2 \
+                       -no-sql-tds \
                        -no-qml-debug \
+                       -no-nis \
                        -no-sse2 \
                        -no-sse3 \
                        -no-ssse3 \
@@ -286,16 +310,16 @@ define Build/Configure
                        -no-xcb-xlib \
                        -no-glib \
                        -no-pulseaudio \
-                       -alsa \
+                       -no-alsa \
                        -no-gtkstyle \
                        -nomake tools \
-                       -make examples \
+                       $(if $(CONFIG_PACKAGE_qt5base-examples),-make examples,-nomake examples) \
                        $(if $(CONFIG_PACKAGE_qt5base-gui),-gui,-no-gui) \
                        $(if $(CONFIG_PACKAGE_qt5base-plugin-imageformats-gif),,-no-gif) \
-                       -widgets \
+                       $(if $(CONFIG_PACKAGE_qt5base-widgets),-widgets,-no-widgets) \
                        -no-optimized-qmake \
                        -no-cups \
-                       -iconv \
+                       $(if $(CONFIG_BUILD_NLS),-iconv,-no-iconv) \
                        -evdev \
                        -no-icu \
                        -fontconfig \