Use upstream (Qt) fix for the ARM native build issue

- Backport upstream patch to fix native builds on ARM and aarch64
  (QTBUG-61128)

- Drop "Backport patch to fix FTBFS with GCC on aarch64 from upstream
  Chromium"

- Drop "Delete all "toolprefix = " lines from
  build/toolchain/linux/BUILD.gn"
epel9
Kevin Kofler 8 years ago
parent a9a9bd00cc
commit 2e9fc1cac1

@ -105,9 +105,9 @@ Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch
# Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128)
# https://codereview.qt-project.org/196178
Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch
# Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium
# https://codereview.chromium.org/2545053002
Patch101: qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch
# Backport upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128)
# https://codereview.qt-project.org/197071
Patch101: qtwebengine-opensource-src-5.9.0-host-toolchain.patch
%if 0%{?fedora} && 0%{?fedora} < 25
# work around missing qt5_qtwebengine_arches macro on F24
@ -354,7 +354,7 @@ BuildArch: noarch
%patch21 -p1 -b .gn-bootstrap-verbose
%patch22 -p1 -b .system-re2
%patch100 -p1 -b .gn-aarch64
%patch101 -p1 -b .aarch64-gcc-toolchain
%patch101 -p1 -b .host-toolchain
# fix // in #include in content/renderer/gpu to avoid debugedit failure
sed -i -e 's!gpu//!gpu/!g' \
src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc
@ -362,10 +362,6 @@ sed -i -e 's!gpu//!gpu/!g' \
sed -i -e 's!\./!!g' \
src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \
src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp
# delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we
# never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS
sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \
src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
# http://bugzilla.redhat.com/1337585
# can't just delete, but we'll overwrite with system headers to be on the safe side
@ -575,9 +571,8 @@ done
- Drop the flag hacks (-g1 -fno-delete-null-pointer-checks), fixed upstream
- Force verbose output from the GN bootstrap process
- Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128)
- Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium
- Backport upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128)
- Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn
- Delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn
* Sat May 13 2017 Rex Dieter <rdieter@fedoraproject.org> - 5.8.0-14
- fix rpm macros

@ -1,30 +0,0 @@
Index: src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
diff --git a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
index 548722d3938017ac936b9088b7a686c2afbbb5fe..86cd7dabc6e86d22a266817dfbb3bf0c719f7992 100644
--- a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
+++ b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
@@ -21,6 +21,24 @@ clang_toolchain("clang_arm64") {
}
}
+gcc_toolchain("arm64") {
+ toolprefix = "aarch64-linux-gnu-"
+
+ cc = "${toolprefix}gcc"
+ cxx = "${toolprefix}g++"
+
+ ar = "${toolprefix}ar"
+ ld = cxx
+ readelf = "${toolprefix}readelf"
+ nm = "${toolprefix}nm"
+
+ toolchain_args = {
+ current_cpu = "arm64"
+ current_os = "linux"
+ is_clang = false
+ }
+}
+
gcc_toolchain("arm") {
toolprefix = "arm-linux-gnueabihf-"

@ -0,0 +1,32 @@
From 33b69c4d138a8eebc392737ee1a58d999f922d59 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Mon, 12 Jun 2017 12:36:17 +0200
Subject: [PATCH] Always set a host toolchain
If we don't give Chromium a host toolchain it will pick one of its own
overriding which compiler should be used, and breaking native builds
on non-x86 architectuers.
Task-number: QTBUG-61128
Change-Id: Ia25a4f43a28214003abcb11dc75a0e57064f76a7
---
src/core/config/linux.pri | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index 24951cd..076d8a3 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -103,8 +103,8 @@ host_build {
gn_args += use_system_libffi=false
} else {
gn_args += custom_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:target\"
+ gn_args += host_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\"
cross_compile {
- gn_args += host_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\"
gn_args += v8_snapshot_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:v8_snapshot\"
GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch)
GN_TARGET_CPU = $$gnArch($$QT_ARCH)
--
2.7.4
Loading…
Cancel
Save