summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtbase_git.bb')
-rw-r--r--recipes-qt/qt5/qtbase_git.bb78
1 files changed, 45 insertions, 33 deletions
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 2e7eae4b..293b9281 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
14 14
15# common for qtbase-native, qtbase-nativesdk and qtbase 15# common for qtbase-native, qtbase-nativesdk and qtbase
16# Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-shared 16# Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-shared
17# 5.12.meta-qt5-shared.5 17# 5.12.meta-qt5-shared.7
18SRC_URI += "\ 18SRC_URI += "\
19 file://0001-Add-linux-oe-g-platform.patch \ 19 file://0001-Add-linux-oe-g-platform.patch \
20 file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ 20 file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -28,43 +28,20 @@ SRC_URI += "\
28 file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \ 28 file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \
29 file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \ 29 file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
30 file://0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch \ 30 file://0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch \
31 file://0013-Check-glibc-version-for-renameat2-statx-on-non-boots.patch \ 31 file://0013-Disable-ltcg-for-host_build.patch \
32 file://0014-Disable-ltcg-for-host_build.patch \ 32 file://0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
33 file://0015-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \ 33 file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \
34 file://0016-corelib-Include-sys-types.h-for-uint32_t.patch \ 34 file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
35 file://0017-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
36" 35"
37 36
38# for syncqt 37# for syncqt
39RDEPENDS_${PN}-tools += "perl" 38RDEPENDS_${PN}-tools += "perl"
40 39
41# workaround for gold bug:
42# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842304
43# https://sourceware.org/bugzilla/show_bug.cgi?id=21712
44# it's triggered only in combination of gold and security_flags.inc,
45# because security_flags.inc now enable pie by default.
46# Adding -no-pie or changing -fuse-ld=gold to -fuse-ld=bfd
47# works around this issue, will use -fuse-ld=bfd as it's considered
48# binutils bug.
49# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++ -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
50# .obj/tst_qmetatype.o(.qtversion+0x0): error: unexpected reloc 3 against global symbol qt_version_tag without base register in object file when generating a position-independent output file
51# collect2: error: ld returned 1 exit status
52#
53# with -no-pie:
54# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++ -no-pie -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
55#
56# with -fuse-ld=gold replaced with -fuse-ld=bfd:
57# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++ -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=bfd -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
58#
59# http://errors.yoctoproject.org/Errors/Details/150329/
60QT_CONFIG_FLAGS_GOLD_x86 = "-no-use-gold-linker"
61LDFLAGS_append_x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
62
63# separate some parts of PACKAGECONFIG which are often changed 40# separate some parts of PACKAGECONFIG which are often changed
64PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}" 41PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', 'no-opengl', d)}"
65PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" 42PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
66PACKAGECONFIG_X11 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb xcb-xinput glib xkb xkbcommon', '', d)}" 43PACKAGECONFIG_X11 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb xcb-xinput glib xkb xkbcommon', '', d)}"
67PACKAGECONFIG_KDE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'kde', 'sm cups fontconfig kms gbm libinput sql-sqlite accessibility openssl', '', d)}" 44PACKAGECONFIG_KDE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'kde', 'sm cups fontconfig kms gbm libinput sql-sqlite openssl', '', d)}"
68PACKAGECONFIG_FONTS ?= "" 45PACKAGECONFIG_FONTS ?= ""
69PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib" 46PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib"
70PACKAGECONFIG_DISTRO ?= "" 47PACKAGECONFIG_DISTRO ?= ""
@@ -72,7 +49,7 @@ PACKAGECONFIG_DISTRO ?= ""
72PACKAGECONFIG_RELEASE ?= "release" 49PACKAGECONFIG_RELEASE ?= "release"
73# This is in qt5.inc, because qtwebkit-examples are using it to enable ca-certificates dependency 50# This is in qt5.inc, because qtwebkit-examples are using it to enable ca-certificates dependency
74# PACKAGECONFIG_OPENSSL ?= "openssl" 51# PACKAGECONFIG_OPENSSL ?= "openssl"
75PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests \ 52PACKAGECONFIG_DEFAULT ?= "accessibility dbus udev evdev widgets tools libs freetype tests \
76 ${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Os', 'optimize-size ltcg', '', d)} \ 53 ${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Os', 'optimize-size ltcg', '', d)} \
77 ${@bb.utils.contains('DISTRO_FEATURES', 'qt5-static', 'static', '', d)} \ 54 ${@bb.utils.contains('DISTRO_FEATURES', 'qt5-static', 'static', '', d)} \
78" 55"
@@ -89,6 +66,9 @@ PACKAGECONFIG ?= " \
89 ${PACKAGECONFIG_SYSTEM} \ 66 ${PACKAGECONFIG_SYSTEM} \
90 ${PACKAGECONFIG_DISTRO} \ 67 ${PACKAGECONFIG_DISTRO} \
91" 68"
69# Choose whether to link to OpenSSL library at linking time or run time
70# Leave the variable empty to let the buildsystem decide, or specify -linked or -runtime
71OPENSSL_LINKING_MODE ??= ""
92 72
93PACKAGECONFIG[static] = "-static,-shared" 73PACKAGECONFIG[static] = "-static,-shared"
94PACKAGECONFIG[release] = "-release,-debug" 74PACKAGECONFIG[release] = "-release,-debug"
@@ -123,7 +103,7 @@ PACKAGECONFIG[no-opengl] = "-no-opengl"
123PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib" 103PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib"
124PACKAGECONFIG[cups] = "-cups,-no-cups,cups" 104PACKAGECONFIG[cups] = "-cups,-no-cups,cups"
125PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus" 105PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus"
126PACKAGECONFIG[xcb] = "-xcb -xcb-xlib -system-xcb,-no-xcb,libxcb xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil" 106PACKAGECONFIG[xcb] = "-xcb -xcb-xlib -system-xcb,-no-xcb,libxcb xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil libxext"
127PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase" 107PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase"
128PACKAGECONFIG[sql-mysql] = "-sql-mysql -mysql_config ${STAGING_BINDIR_CROSS}/mysql_config,-no-sql-mysql,mysql5" 108PACKAGECONFIG[sql-mysql] = "-sql-mysql -mysql_config ${STAGING_BINDIR_CROSS}/mysql_config,-no-sql-mysql,mysql5"
129PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql" 109PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql"
@@ -148,7 +128,7 @@ PACKAGECONFIG[kms] = "-kms,-no-kms,drm virtual/egl"
148PACKAGECONFIG[gbm] = "-gbm,-no-gbm,virtual/libgbm" 128PACKAGECONFIG[gbm] = "-gbm,-no-gbm,virtual/libgbm"
149PACKAGECONFIG[icu] = "-icu,-no-icu,icu" 129PACKAGECONFIG[icu] = "-icu,-no-icu,icu"
150PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev" 130PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev"
151PACKAGECONFIG[openssl] = "-openssl,-no-openssl,openssl,libssl" 131PACKAGECONFIG[openssl] = "-openssl${OPENSSL_LINKING_MODE},-no-openssl,openssl,libssl"
152PACKAGECONFIG[widgets] = "-widgets,-no-widgets" 132PACKAGECONFIG[widgets] = "-widgets,-no-widgets"
153PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy" 133PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy"
154PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput" 134PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput"
@@ -157,6 +137,38 @@ PACKAGECONFIG[journald] = "-journald,-no-journald,systemd"
157PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy," 137PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy,"
158 138
159QT_CONFIG_FLAGS_GOLD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-use-gold-linker', '-no-use-gold-linker', d)}" 139QT_CONFIG_FLAGS_GOLD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-use-gold-linker', '-no-use-gold-linker', d)}"
140# workaround for gold bug:
141# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842304
142# https://sourceware.org/bugzilla/show_bug.cgi?id=21712
143# it's triggered only in combination of gold and security_flags.inc,
144# because security_flags.inc now enable pie by default.
145# Adding -no-pie or changing -fuse-ld=gold to -fuse-ld=bfd
146# works around this issue, will use -fuse-ld=bfd as it's considered
147# binutils bug.
148# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++ -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
149# .obj/tst_qmetatype.o(.qtversion+0x0): error: unexpected reloc 3 against global symbol qt_version_tag without base register in object file when generating a position-independent output file
150# collect2: error: ld returned 1 exit status
151#
152# with -no-pie:
153# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++ -no-pie -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
154#
155# with -fuse-ld=gold replaced with -fuse-ld=bfd:
156# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++ -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=bfd -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
157#
158# http://errors.yoctoproject.org/Errors/Details/150329/
159# QT_CONFIG_FLAGS_GOLD_x86 = "-no-use-gold-linker"
160# LDFLAGS_append_x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
161
162# since the upgrade to 5.12.2 this got worse, with gold enabled configure will no longer pass the test for xlib
163# because with full paths to libraries since qtbase commit 521a85395 it fails to link with
164# /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.12.3+gitAUTOINC+b527725766-r0/recipe-sysroot/usr/lib/libm.so
165# as reported in:
166# https://github.com/meta-qt5/meta-qt5/pull/181#issuecomment-484425112
167# resulting in do_configure failure:
168# http://errors.yoctoproject.org/Errors/Details/237856/
169QT_CONFIG_FLAGS_GOLD = "-no-use-gold-linker"
170LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
171
160QT_CONFIG_FLAGS += " \ 172QT_CONFIG_FLAGS += " \
161 ${QT_CONFIG_FLAGS_GOLD} \ 173 ${QT_CONFIG_FLAGS_GOLD} \
162 -shared \ 174 -shared \