qtpdf: upgrade to v5.15.10-lts

* sync with qtwebengine recipe
* replace
  0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch
  with whole set of chromium patches from qtwebengine where
  recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch
  should do the same

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa
2022-06-14 14:45:05 +02:00
parent 1e0b66913b
commit 387784b0d7
6 changed files with 87 additions and 130 deletions

View File

@@ -1,4 +1,4 @@
From 988d1e3f9c4415c2a59833b74098639d3fe71524 Mon Sep 17 00:00:00 2001
From 492221e627937ef0063a9da125a6aef847eebcef Mon Sep 17 00:00:00 2001
From: Leif Middelschulte <Leif.Middelschulte@klsmartin.com>
Date: Tue, 8 Feb 2022 14:14:02 +0100
Subject: [PATCH] configure.json: remove python2 dependency
@@ -8,7 +8,7 @@ Subject: [PATCH] configure.json: remove python2 dependency
1 file changed, 1 deletion(-)
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index 9eb5e8e3..ebe31c21 100644
index 9eb5e8e33..ebe31c216 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -399,7 +399,6 @@

View File

@@ -1,97 +0,0 @@
From cab3c06864569577158626e500b2253687fc09ba Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 29 Apr 2019 12:00:19 +0300
Subject: [PATCH] Remove the GN settings done for clang that conflict with OE
clang cross compiler that is build with meta-clang has lot of these
settings built-in and specifying them here confuses the compiler
--target option and -no-canonical-prefixes options result in clang
finding the headers in target sysroot
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Rebased-by: Maksim Sisov <msisov@igalia.com>
---
src/3rdparty/chromium/build/config/compiler/BUILD.gn | 35 ----------------------------------
1 file changed, 35 deletions(-)
--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn
+++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -781,10 +781,6 @@ config("compiler_cpu_abi") {
]
}
} else if (current_cpu == "arm") {
- if (is_clang && !is_android && !is_nacl) {
- cflags += [ "--target=arm-linux-gnueabihf" ]
- ldflags += [ "--target=arm-linux-gnueabihf" ]
- }
if (!is_nacl) {
cflags += [
"-march=$arm_arch",
@@ -794,11 +790,6 @@ config("compiler_cpu_abi") {
if (arm_tune != "") {
cflags += [ "-mtune=$arm_tune" ]
}
- } else if (current_cpu == "arm64") {
- if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
- cflags += [ "--target=aarch64-linux-gnu" ]
- ldflags += [ "--target=aarch64-linux-gnu" ]
- }
} else if (current_cpu == "mipsel" && !is_nacl) {
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
@@ -806,9 +797,6 @@ config("compiler_cpu_abi") {
if (is_android) {
cflags += [ "--target=mipsel-linux-android" ]
ldflags += [ "--target=mipsel-linux-android" ]
- } else {
- cflags += [ "--target=mipsel-linux-gnu" ]
- ldflags += [ "--target=mipsel-linux-gnu" ]
}
} else {
cflags += [ "-EL" ]
@@ -888,8 +876,6 @@ config("compiler_cpu_abi") {
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
if (is_clang) {
- cflags += [ "--target=mips-linux-gnu" ]
- ldflags += [ "--target=mips-linux-gnu" ]
} else {
cflags += [ "-EB" ]
ldflags += [ "-EB" ]
@@ -937,9 +923,6 @@ config("compiler_cpu_abi") {
if (is_android) {
cflags += [ "--target=mips64el-linux-android" ]
ldflags += [ "--target=mips64el-linux-android" ]
- } else {
- cflags += [ "--target=mips64el-linux-gnuabi64" ]
- ldflags += [ "--target=mips64el-linux-gnuabi64" ]
}
} else {
cflags += [
@@ -997,8 +980,6 @@ config("compiler_cpu_abi") {
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
if (is_clang) {
- cflags += [ "--target=mips64-linux-gnuabi64" ]
- ldflags += [ "--target=mips64-linux-gnuabi64" ]
} else {
cflags += [
"-EB",
@@ -1166,13 +1147,6 @@ config("compiler_deterministic") {
}
}
}
-
- # Tells the compiler not to use absolute paths when passing the default
- # paths to the tools it invokes. We don't want this because we don't
- # really need it and it can mess up the goma cache entries.
- if (is_clang && !is_nacl && !(use_qt && use_libcxx)) {
- cflags += [ "-no-canonical-prefixes" ]
- }
}
config("clang_revision") {

View File

@@ -1,4 +1,4 @@
From 4d2f525ccf3255dd4a0e774d3db0533ae4aba98f Mon Sep 17 00:00:00 2001
From 38a26f8fa1fba94c621e2eeb2428d47a4640e6fa Mon Sep 17 00:00:00 2001
From: Leif Middelschulte <Leif.Middelschulte@klsmartin.com>
Date: Tue, 8 Feb 2022 16:28:14 +0100
Subject: [PATCH] gn.pro: do not try to statically link stdc++
@@ -8,7 +8,7 @@ Subject: [PATCH] gn.pro: do not try to statically link stdc++
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro
index a8ca6567..9632f0ef 100644
index 5094574ed..7b8365157 100644
--- a/src/buildtools/gn.pro
+++ b/src/buildtools/gn.pro
@@ -20,7 +20,8 @@ build_pass|!debug_and_release {
@@ -18,6 +18,6 @@ index a8ca6567..9632f0ef 100644
- --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\"
+ --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" \
+ --no-static-libstdc++
!isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\"
msvc:!clang_cl: gn_gen_args += --use-lto

View File

@@ -0,0 +1,39 @@
From a769d4c4cab7168d5e92b28790cf383985e5c177 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 26 Feb 2022 18:15:28 -0800
Subject: [PATCH] Fix build with clang
use GNU runtime when building native tools like gn
when using native clang compiler
Fixes
| FAILED: gn
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/qtpdf/5.15.8+gitAUTOINC+73e76f9e86_48a205f9e0-r0/recipe-sysroot-native/usr/bin/clang++ -O3 -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-stri
p-all -Wl,--as-needed -pthread -o gn -Wl,--start-group tools/gn/gn_main.o base.a gn_lib.a -Wl,--end-group -ldl
| /mnt/b/yoe/master/build/tmp/hosttools/ld: cannot find /usr/lib/clang/14.0.0/lib/linux/libclang_rt.builtins-x86_64.a: No such file or directory
Fix building with clang from meta-clang
Clang defaults to llvm runtime and this patch is needed
for building the host tools, since its using native runtime
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
src/buildtools/gn.pro | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro
index 7b8365157..51574e0fd 100644
--- a/src/buildtools/gn.pro
+++ b/src/buildtools/gn.pro
@@ -20,7 +20,7 @@ build_pass|!debug_and_release {
gn_gen_args = --no-last-commit-position --out-path $$out_path \
--cc \"$$which($$CC_host)\" --cxx \"$$which($$CXX_host)\" \
- --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" \
+ --ld \"$$which($$CXX_host) -rtlib=libgcc -unwindlib=libgcc\" --ar \"$$which(ar)\" \
--no-static-libstdc++
!isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\"

View File

@@ -1,19 +0,0 @@
Fix building with clang from meta-clang
Clang defaults to llvm runtime and this patch is needed
for building the host tools, since its using native runtime
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/src/buildtools/gn.pro
+++ b/src/buildtools/gn.pro
@@ -20,7 +20,7 @@ build_pass|!debug_and_release {
gn_gen_args = --no-last-commit-position --out-path $$out_path \
--cc \"$$which($$CC_host)\" --cxx \"$$which($$CXX_host)\" \
- --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" \
+ --ld \"$$which($$CXX_host) -rtlib=libgcc -unwindlib=libgcc\" --ar \"$$which(ar)\" \
--no-static-libstdc++
msvc:!clang_cl: gn_gen_args += --use-lto

View File

@@ -128,8 +128,8 @@ RDEPENDS:${PN}-examples += " \
QT_MODULE_BRANCH_CHROMIUM = "87-based"
QT_MODULE_BRANCH = "5.15"
PV = "5.15.8+git${SRCPV}"
QT_MODULE_BRANCH = "5.15.10"
PV = "5.15.10+git${SRCPV}"
# Uses the same repository and couple patches as qtwebengine, but qtwebengine
# still depends on python2
@@ -137,25 +137,56 @@ QT_MODULE = "qtwebengine"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtwebengine:"
# Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15-glibc
# 5.15-glibc.meta-qt5.13
# 5.15-glibc.meta-qt5.14
SRC_URI += " \
${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty \
file://0001-Force-host-toolchain-configuration.patch \
file://0002-qmake.conf-lower-MODULE_VERSION-to-5.15.2.patch \
file://0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch \
file://0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch \
"
# Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15
# 5.15.meta-qt5.13
# 5.15.meta-qt5.14
SRC_URI:append:libc-musl = "\
file://0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch \
file://0004-musl-link-against-libexecinfo.patch \
file://0005-mkspecs-Allow-builds-with-libc-glibc.patch \
"
SRC_URI:append:runtime-llvm = " file://native-clang.patch "
# Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/87-based-glibc
# 87-based-glibc.meta-qt5.9
SRC_URI += " \
file://chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \
file://chromium/0002-chromium-fix-build-with-clang.patch;patchdir=src/3rdparty \
file://chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch;patchdir=src/3rdparty \
file://chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch;patchdir=src/3rdparty \
file://chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch;patchdir=src/3rdparty \
file://chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch;patchdir=src/3rdparty \
file://chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch;patchdir=src/3rdparty \
file://chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch;patchdir=src/3rdparty \
file://chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch;patchdir=src/3rdparty \
file://chromium/0010-chromium-icu-use-system-library-only-targets.patch;patchdir=src/3rdparty \
file://chromium/0011-chromium-Remove-TRUE-to-prep-landing-of-icu68.patch;patchdir=src/3rdparty \
file://chromium/0012-chromium-skia-Fix-build-with-gcc-12.patch;patchdir=src/3rdparty \
"
SRCREV_qtwebengine = "73e76f9e86b3fded45be6b232bdebe75e7136e4a"
SRCREV_chromium = "48a205f9e054b5cc3e67df2e25382da9460c0015"
# Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/87-based
# 87-based.meta-qt5.9
SRC_URI:append:libc-musl = "\
file://chromium/0013-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch;patchdir=src/3rdparty \
file://chromium/0014-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch;patchdir=src/3rdparty \
file://chromium/0015-chromium-musl-include-fcntl.h-for-loff_t.patch;patchdir=src/3rdparty \
file://chromium/0016-chromium-musl-use-off64_t-instead-of-the-internal-__.patch;patchdir=src/3rdparty \
file://chromium/0017-chromium-musl-linux-glibc-make-the-distinction.patch;patchdir=src/3rdparty \
file://chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch;patchdir=src/3rdparty \
file://chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch;patchdir=src/3rdparty \
file://chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \
file://chromium/0021-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch;patchdir=src/3rdparty \
file://chromium/0022-chromium-musl-pread-pwrite.patch;patchdir=src/3rdparty \
file://chromium/0023-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch;patchdir=src/3rdparty \
"
SRCREV_qtwebengine = "c7e716ef1ffd63a8ab1f4dbf879230849eb3b505"
# this is 3 commits ahead of what submodule in 5.15.10 uses (caba2fcb0fe8a8d213c4c79d26da3bb88eee61c7), but contains useful fix:
SRCREV_chromium = "ecc2bb74f1f7140fc52650042299be18e826b27b"
SRCREV = "${SRCREV_qtwebengine}"
SRCREV_FORMAT = "qtwebengine_chromium"
@@ -171,10 +202,13 @@ INSANE_SKIP:${PN} += "textrel"
# First patch skips "python2" dependency checks for the pdf module
# Second patch repairs a failing build of the `gn` buildtool due to missing (host) libstdc++
# Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15-qtpdf
# 5.15-qtpdf.meta-qt5.1
SRC_URI += " \
file://0001-configure.json-remove-python2-dependency.patch \
file://0002-gn.pro-do-not-try-to-statically-link-stdc.patch \
"
SRC_URI:append:runtime-llvm = " file://0003-Fix-build-with-clang.patch"
# These flags below go more into detail than qtwebengine's documentation
PACKAGECONFIG[no-core] = "-no-build-qtwebengine-core,,"