diff options
Diffstat (limited to 'recipes-qt/qt5/qtbase_git.bb')
| -rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 83 |
1 files changed, 37 insertions, 46 deletions
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index 8faa3ef8..9a7ffaf5 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,38 +28,15 @@ 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', '', d)}" |
| 65 | PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" | 42 | PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" |
| @@ -160,6 +137,38 @@ PACKAGECONFIG[journald] = "-journald,-no-journald,systemd" | |||
| 160 | PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy," | 137 | PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy," |
| 161 | 138 | ||
| 162 | 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 | |||
| 163 | QT_CONFIG_FLAGS += " \ | 172 | QT_CONFIG_FLAGS += " \ |
| 164 | ${QT_CONFIG_FLAGS_GOLD} \ | 173 | ${QT_CONFIG_FLAGS_GOLD} \ |
| 165 | -shared \ | 174 | -shared \ |
| @@ -266,22 +275,4 @@ INSANE_SKIP_${PN}-mkspecs += "file-rdeps" | |||
| 266 | 275 | ||
| 267 | RRECOMMENDS_${PN}-plugins += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11-locale', '', d)}" | 276 | RRECOMMENDS_${PN}-plugins += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11-locale', '', d)}" |
| 268 | 277 | ||
| 269 | TARGET_MKSPEC ?= "linux-g++" | ||
| 270 | |||
| 271 | # use clean mkspecs on target | ||
| 272 | pkg_postinst_${PN}-tools () { | ||
| 273 | sed -i \ | ||
| 274 | -e 's:HostSpec =.*:HostSpec = ${TARGET_MKSPEC}:g' \ | ||
| 275 | -e 's:TargetSpec =.*:TargetSpec = ${TARGET_MKSPEC}:g' \ | ||
| 276 | $D${bindir}/qt.conf | ||
| 277 | } | ||
| 278 | |||
| 279 | pkg_postinst_${PN}-mkspecs () { | ||
| 280 | sed -i 's: cross_compile : :g' $D${OE_QMAKE_PATH_ARCHDATA}/mkspecs/qconfig.pri | ||
| 281 | sed -i \ | ||
| 282 | -e 's: cross_compile : :g' \ | ||
| 283 | -e 's:HOST_QT_TOOLS =.*::g' \ | ||
| 284 | $D${OE_QMAKE_PATH_ARCHDATA}/mkspecs/qmodule.pri | ||
| 285 | } | ||
| 286 | |||
| 287 | SRCREV = "12b96dbb81a1a7bc5ffc08c24942038b007985e9" | 278 | SRCREV = "12b96dbb81a1a7bc5ffc08c24942038b007985e9" |
