diff options
Diffstat (limited to 'recipes-qt/qt5/qtbase_git.bb')
| -rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 78 |
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 |
| 18 | SRC_URI += "\ | 18 | SRC_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 |
| 39 | RDEPENDS_${PN}-tools += "perl" | 38 | RDEPENDS_${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/ | ||
| 60 | QT_CONFIG_FLAGS_GOLD_x86 = "-no-use-gold-linker" | ||
| 61 | LDFLAGS_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 |
| 64 | PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}" | 41 | PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', 'no-opengl', d)}" |
| 65 | PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" | 42 | PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" |
| 66 | PACKAGECONFIG_X11 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb xcb-xinput glib xkb xkbcommon', '', d)}" | 43 | PACKAGECONFIG_X11 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb xcb-xinput glib xkb xkbcommon', '', d)}" |
| 67 | PACKAGECONFIG_KDE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'kde', 'sm cups fontconfig kms gbm libinput sql-sqlite accessibility openssl', '', d)}" | 44 | PACKAGECONFIG_KDE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'kde', 'sm cups fontconfig kms gbm libinput sql-sqlite openssl', '', d)}" |
| 68 | PACKAGECONFIG_FONTS ?= "" | 45 | PACKAGECONFIG_FONTS ?= "" |
| 69 | PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib" | 46 | PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib" |
| 70 | PACKAGECONFIG_DISTRO ?= "" | 47 | PACKAGECONFIG_DISTRO ?= "" |
| @@ -72,7 +49,7 @@ PACKAGECONFIG_DISTRO ?= "" | |||
| 72 | PACKAGECONFIG_RELEASE ?= "release" | 49 | PACKAGECONFIG_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" |
| 75 | PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests \ | 52 | PACKAGECONFIG_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 | ||
| 71 | OPENSSL_LINKING_MODE ??= "" | ||
| 92 | 72 | ||
| 93 | PACKAGECONFIG[static] = "-static,-shared" | 73 | PACKAGECONFIG[static] = "-static,-shared" |
| 94 | PACKAGECONFIG[release] = "-release,-debug" | 74 | PACKAGECONFIG[release] = "-release,-debug" |
| @@ -123,7 +103,7 @@ PACKAGECONFIG[no-opengl] = "-no-opengl" | |||
| 123 | PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib" | 103 | PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib" |
| 124 | PACKAGECONFIG[cups] = "-cups,-no-cups,cups" | 104 | PACKAGECONFIG[cups] = "-cups,-no-cups,cups" |
| 125 | PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus" | 105 | PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus" |
| 126 | PACKAGECONFIG[xcb] = "-xcb -xcb-xlib -system-xcb,-no-xcb,libxcb xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil" | 106 | PACKAGECONFIG[xcb] = "-xcb -xcb-xlib -system-xcb,-no-xcb,libxcb xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil libxext" |
| 127 | PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase" | 107 | PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase" |
| 128 | PACKAGECONFIG[sql-mysql] = "-sql-mysql -mysql_config ${STAGING_BINDIR_CROSS}/mysql_config,-no-sql-mysql,mysql5" | 108 | PACKAGECONFIG[sql-mysql] = "-sql-mysql -mysql_config ${STAGING_BINDIR_CROSS}/mysql_config,-no-sql-mysql,mysql5" |
| 129 | PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql" | 109 | PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql" |
| @@ -148,7 +128,7 @@ PACKAGECONFIG[kms] = "-kms,-no-kms,drm virtual/egl" | |||
| 148 | PACKAGECONFIG[gbm] = "-gbm,-no-gbm,virtual/libgbm" | 128 | PACKAGECONFIG[gbm] = "-gbm,-no-gbm,virtual/libgbm" |
| 149 | PACKAGECONFIG[icu] = "-icu,-no-icu,icu" | 129 | PACKAGECONFIG[icu] = "-icu,-no-icu,icu" |
| 150 | PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev" | 130 | PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev" |
| 151 | PACKAGECONFIG[openssl] = "-openssl,-no-openssl,openssl,libssl" | 131 | PACKAGECONFIG[openssl] = "-openssl${OPENSSL_LINKING_MODE},-no-openssl,openssl,libssl" |
| 152 | PACKAGECONFIG[widgets] = "-widgets,-no-widgets" | 132 | PACKAGECONFIG[widgets] = "-widgets,-no-widgets" |
| 153 | PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy" | 133 | PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy" |
| 154 | PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput" | 134 | PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput" |
| @@ -157,6 +137,38 @@ PACKAGECONFIG[journald] = "-journald,-no-journald,systemd" | |||
| 157 | PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy," | 137 | PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy," |
| 158 | 138 | ||
| 159 | QT_CONFIG_FLAGS_GOLD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-use-gold-linker', '-no-use-gold-linker', d)}" | 139 | QT_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/ | ||
| 169 | QT_CONFIG_FLAGS_GOLD = "-no-use-gold-linker" | ||
| 170 | LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | ||
| 171 | |||
| 160 | QT_CONFIG_FLAGS += " \ | 172 | QT_CONFIG_FLAGS += " \ |
| 161 | ${QT_CONFIG_FLAGS_GOLD} \ | 173 | ${QT_CONFIG_FLAGS_GOLD} \ |
| 162 | -shared \ | 174 | -shared \ |
