From 705bf27fe143e9e36bace064a2d076ee5b444a30 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 14:38:07 +0200 Subject: [PATCH] Revert "Use upstream (Qt) fix for the ARM native build issue" This reverts commit 2e9fc1cac1c8e417bbb127ba671a4ab6bbd1d227. This does not work. --- qt5-qtwebengine.spec | 15 ++++++--- ...urce-src-5.9.0-aarch64-gcc-toolchain.patch | 30 +++++++++++++++++ ...-opensource-src-5.9.0-host-toolchain.patch | 32 ------------------- 3 files changed, 40 insertions(+), 37 deletions(-) create mode 100644 qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-host-toolchain.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7cc4c18..9bd1ec1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -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 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 +# 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 %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 .host-toolchain +%patch101 -p1 -b .aarch64-gcc-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,6 +362,10 @@ 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 @@ -571,8 +575,9 @@ 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 upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128) +- Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium - 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 - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch new file mode 100644 index 0000000..76228a0 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch @@ -0,0 +1,30 @@ +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-" + diff --git a/qtwebengine-opensource-src-5.9.0-host-toolchain.patch b/qtwebengine-opensource-src-5.9.0-host-toolchain.patch deleted file mode 100644 index aab4e90..0000000 --- a/qtwebengine-opensource-src-5.9.0-host-toolchain.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 33b69c4d138a8eebc392737ee1a58d999f922d59 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -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 -