From 2f0bb02c7aff4611afe6233628182f1dda54c7e6b3bc71b2268a6c97f06bec46 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 18 Jun 2017 11:49:13 +0000 Subject: [PATCH] Accepting request 503530 from KDE:Qt5 1 OBS-URL: https://build.opensuse.org/request/show/503530 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwebengine?expand=0&rev=20 --- arm64-linux.patch | 43 ++++++++++++++++++++++++++++++++++++++ arm64-toolchain.patch | 42 +++++++++++++++++++++++++++++++++++++ libqt5-qtwebengine.changes | 9 ++++++++ libqt5-qtwebengine.spec | 11 ++++++++++ 4 files changed, 105 insertions(+) create mode 100644 arm64-linux.patch create mode 100644 arm64-toolchain.patch diff --git a/arm64-linux.patch b/arm64-linux.patch new file mode 100644 index 0000000..b57cdb9 --- /dev/null +++ b/arm64-linux.patch @@ -0,0 +1,43 @@ +From 801c957651fba94b5d7dde9cc490378a4dc3a987 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Thu, 1 Jun 2017 11:40:02 +0200 +Subject: [PATCH] [Backport] GN: Add Arm64 Linux support + +Add Arm64 linux support be able to build GN binary for +native arm64 builds. + +R=dpranke@chromium.org, brettw@chromium.org + +Review-Url: https://codereview.chromium.org/2550673002 + +Task-number: QTBUG-61128 +Change-Id: I3aa6b6ca7df374428a7f4a8b4db9f488a8926f6c +Reviewed-by: Joerg Bornemann +--- + src/3rdparty/chromium/tools/gn/args.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/3rdparty/chromium/tools/gn/args.cc b/src/3rdparty/chromium/tools/gn/args.cc +index 7285d7a..54703e1 100644 +--- a/src/3rdparty/chromium/tools/gn/args.cc ++++ b/src/3rdparty/chromium/tools/gn/args.cc +@@ -266,6 +266,7 @@ void Args::SetSystemVarsLocked(Scope* dest) const { + static const char kX86[] = "x86"; + static const char kX64[] = "x64"; + static const char kArm[] = "arm"; ++ static const char kArm64[] = "arm64"; + static const char kMips[] = "mipsel"; + static const char kS390X[] = "s390x"; + static const char kPPC64[] = "ppc64"; +@@ -280,6 +281,8 @@ void Args::SetSystemVarsLocked(Scope* dest) const { + arch = kX64; + else if (os_arch.substr(0, 3) == "arm") + arch = kArm; ++ else if (os_arch == "aarch64") ++ arch = kArm64; + else if (os_arch == "mips") + arch = kMips; + else if (os_arch == "s390x") +-- +2.7.4 + diff --git a/arm64-toolchain.patch b/arm64-toolchain.patch new file mode 100644 index 0000000..c53ebe1 --- /dev/null +++ b/arm64-toolchain.patch @@ -0,0 +1,42 @@ +Subject: Add gcc toolchain for arm64/linux + +This is needed for Chromium builds in debian/arm64 +and matches how arm, x86 and x86_64 also have +both clang and gcc toolchains available. + +R=brettw@chromium.org, dpranke@chromium.org, scottmg@chromium.org + +Committed: https://crrev.com/62c17901df9489112816380771666f4e6857cd59 +Cr-Commit-Position: refs/heads/master@{#436267} + +--- +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/libqt5-qtwebengine.changes b/libqt5-qtwebengine.changes index 4f051da..671e9b9 100644 --- a/libqt5-qtwebengine.changes +++ b/libqt5-qtwebengine.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jun 13 11:26:59 UTC 2017 - fvogt@suse.com + +- Backport patches to fix build on AArch64 and add workaround + (QTBUG-61128): + * arm64-linux.patch + * arm64-toolchain.patch +- Use proprietary codecs if supported by system ffmpeg (boo#1043375) + ------------------------------------------------------------------- Thu Jun 1 07:58:09 UTC 2017 - fabian@ritter-vogt.de diff --git a/libqt5-qtwebengine.spec b/libqt5-qtwebengine.spec index fca8e51..ef5908a 100644 --- a/libqt5-qtwebengine.spec +++ b/libqt5-qtwebengine.spec @@ -58,6 +58,10 @@ Source: https://download.qt.io/official_releases/qt/5.9/%{real_version}/ Source1: baselibs.conf # PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6 Patch2: armv6-ffmpeg-no-thumb.patch +# PATCH-FIX-UPSTREAM +Patch3: arm64-linux.patch +# PATCH-FIX-UPSTREAM (chromium!) +Patch4: arm64-toolchain.patch # PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff -- Detect nouveau opengl drivers and disable gpu usage to work around nouveau crashing Patch5: disable-gpu-when-using-nouveau-boo-1005323.diff # http://www.chromium.org/blink not ported to PowerPC @@ -225,7 +229,12 @@ Examples for the libqt5-qtwebengine module. %setup -q -n qtwebengine-opensource-src-%{real_version} sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %patch5 -p1 +# QTBUG-61128 +sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ + src/3rdparty/chromium/build/toolchain/linux/BUILD.gn %build %if %qt5_snapshot @@ -242,8 +251,10 @@ RPM_OPT_FLAGS+=" -march=armv6zk -mfloat-abi=hard -mfpu=vfp" RPM_OPT_FLAGS="$RPM_OPT_FLAGS " export RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-g / } %endif +# It does not actually include proprietary codecs, it only makes it attempt to use ffmpeg %qmake5 QMAKE_CFLAGS="$RPM_OPT_FLAGS" \ QMAKE_CFLAGS+="$RPM_OPT_FLAGS" \ + WEBENGINE_CONFIG+=use_proprietary_codecs \ %if %{with system_icu} WEBENGINE_CONFIG+=use_system_icu \ %endif