Fix FTBFS due to missing ARM CPU feature detection routines
- chromium-skia: build SkUtilsArm.cpp also on non-Android ARM - webrtc: backport CPU feature detection for ARM Linux, enable it for Chromium
This commit is contained in:
parent
4d98042d03
commit
6f435b9ab6
|
@ -88,6 +88,11 @@ Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch
|
|||
Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch
|
||||
# remove Android depenencies from openmax_dl ARM NEON detection (detect.c)
|
||||
Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch
|
||||
# chromium-skia: build SkUtilsArm.cpp also on non-Android ARM
|
||||
Patch11: qtwebengine-opensource-src-5.7.1-skia-neon.patch
|
||||
# webrtc: backport https://codereview.webrtc.org/1820133002/ "Implement CPU
|
||||
# feature detection for ARM Linux." and enable the detection also for Chromium
|
||||
Patch12: qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch
|
||||
|
||||
# handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches
|
||||
ExclusiveArch: %{qt5_qtwebengine_arches}
|
||||
|
@ -317,6 +322,8 @@ BuildArch: noarch
|
|||
%patch7 -p1 -b .webrtc-neon
|
||||
%patch8 -p1 -b .system-icu54
|
||||
%patch10 -p1 -b .openmax-dl-neon
|
||||
%patch11 -p1 -b .skia-neon
|
||||
%patch12 -p1 -b .webrtc-neon-detect
|
||||
# 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
|
||||
|
@ -479,6 +486,8 @@ popd
|
|||
- Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23
|
||||
- Remove Android depenencies from openmax_dl ARM NEON detection (detect.c)
|
||||
- Set CFLAGS, unset both CFLAGS and CXXFLAGS between qmake and make
|
||||
- chromium-skia: build SkUtilsArm.cpp also on non-Android ARM
|
||||
- webrtc: backport CPU feature detection for ARM Linux, enable it for Chromium
|
||||
|
||||
* Thu Nov 10 2016 Helio Chissini de Castro <helio@kde.org> - 5.7.1-1
|
||||
- New upstream version
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi
|
||||
--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi 2016-11-07 15:46:18.000000000 +0100
|
||||
+++ qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi 2016-12-04 14:34:12.531877529 +0100
|
||||
@@ -159,6 +159,11 @@
|
||||
'../build/android/ndk.gyp:cpu_features',
|
||||
],
|
||||
}],
|
||||
+ [ 'OS != "android" and target_arch == "arm"', {
|
||||
+ 'sources': [
|
||||
+ '../third_party/skia/src/core/SkUtilsArm.cpp',
|
||||
+ ],
|
||||
+ }],
|
||||
[ 'desktop_linux == 1 or chromeos == 1 or qt_os=="embedded_linux"', {
|
||||
'dependencies': [
|
||||
'../build/linux/system.gyp:fontconfig',
|
|
@ -0,0 +1,159 @@
|
|||
diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn
|
||||
--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2016-11-07 15:46:18.000000000 +0100
|
||||
+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2016-12-04 15:06:23.886224907 +0100
|
||||
@@ -133,6 +133,8 @@
|
||||
#"WEBRTC_CLOCK_TYPE_REALTIME",
|
||||
]
|
||||
|
||||
+ deps += [ ":cpu_features_linux" ]
|
||||
+
|
||||
libs += [ "rt" ]
|
||||
}
|
||||
|
||||
@@ -206,3 +208,14 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
+
|
||||
+if (is_linux) {
|
||||
+ source_set("cpu_features_linux") {
|
||||
+ sources = [
|
||||
+ "source/cpu_features_linux.c",
|
||||
+ ]
|
||||
+
|
||||
+ configs += [ "..:common_config" ]
|
||||
+ public_configs = [ "..:common_inherited_config" ]
|
||||
+ }
|
||||
+}
|
||||
diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp
|
||||
--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp 2016-11-07 15:46:18.000000000 +0100
|
||||
+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp 2016-12-04 15:05:24.150142787 +0100
|
||||
@@ -7,6 +7,7 @@
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
{
|
||||
+ 'includes': [ '../build/common.gypi', ],
|
||||
'conditions': [
|
||||
['OS=="android"', {
|
||||
'targets': [
|
||||
@@ -21,6 +22,20 @@
|
||||
],
|
||||
},
|
||||
],
|
||||
+ }],
|
||||
+ ['OS=="linux"', {
|
||||
+ 'targets': [
|
||||
+ {
|
||||
+ 'target_name': 'cpu_features_linux',
|
||||
+ 'type': 'static_library',
|
||||
+ 'sources': [
|
||||
+ 'source/cpu_features_linux.c',
|
||||
+ ],
|
||||
+ 'dependencies': [
|
||||
+ '<(webrtc_root)/common.gyp:webrtc_common',
|
||||
+ ],
|
||||
+ },
|
||||
+ ],
|
||||
}],
|
||||
], # conditions
|
||||
}
|
||||
diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c
|
||||
--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c 2016-12-04 15:05:24.150142787 +0100
|
||||
@@ -0,0 +1,83 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
||||
+ *
|
||||
+ * Use of this source code is governed by a BSD-style license
|
||||
+ * that can be found in the LICENSE file in the root of the source
|
||||
+ * tree. An additional intellectual property rights grant can be found
|
||||
+ * in the file PATENTS. All contributing project authors may
|
||||
+ * be found in the AUTHORS file in the root of the source tree.
|
||||
+ */
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <features.h>
|
||||
+#if __GLIBC_PREREQ(2, 16)
|
||||
+#include <sys/auxv.h>
|
||||
+#else
|
||||
+#include <fcntl.h>
|
||||
+#include <unistd.h>
|
||||
+#include <errno.h>
|
||||
+#include <link.h>
|
||||
+#endif
|
||||
+#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
|
||||
+
|
||||
+#if defined(WEBRTC_ARCH_ARM_FAMILY)
|
||||
+#include <asm/hwcap.h>
|
||||
+
|
||||
+uint64_t WebRtc_GetCPUFeaturesARM(void) {
|
||||
+ uint64_t result = 0;
|
||||
+ int architecture = 0;
|
||||
+ unsigned long hwcap = 0;
|
||||
+ const char* platform = NULL;
|
||||
+#if __GLIBC_PREREQ(2, 16)
|
||||
+ hwcap = getauxval(AT_HWCAP);
|
||||
+ platform = (const char*)getauxval(AT_PLATFORM);
|
||||
+#else
|
||||
+ ElfW(auxv_t) auxv;
|
||||
+ int fd = open("/proc/self/auxv", O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ while (hwcap == 0 || platform == NULL) {
|
||||
+ if (read(fd, &auxv, sizeof(auxv)) < (ssize_t)sizeof(auxv)) {
|
||||
+ if (errno == EINTR)
|
||||
+ continue;
|
||||
+ break;
|
||||
+ }
|
||||
+ switch (auxv.a_type) {
|
||||
+ case AT_HWCAP:
|
||||
+ hwcap = auxv.a_un.a_val;
|
||||
+ break;
|
||||
+ case AT_PLATFORM:
|
||||
+ platform = (const char*)auxv.a_un.a_val;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ close(fd);
|
||||
+ }
|
||||
+#endif // __GLIBC_PREREQ(2,16)
|
||||
+#if defined(__aarch64__)
|
||||
+ architecture = 8;
|
||||
+ if ((hwcap & HWCAP_FP) != 0)
|
||||
+ result |= kCPUFeatureVFPv3;
|
||||
+ if ((hwcap & HWCAP_ASIMD) != 0)
|
||||
+ result |= kCPUFeatureNEON;
|
||||
+#else
|
||||
+ if (platform != NULL) {
|
||||
+ /* expect a string in the form "v6l" or "v7l", etc.
|
||||
+ */
|
||||
+ if (platform[0] == 'v' && '0' <= platform[1] && platform[1] <= '9' &&
|
||||
+ (platform[2] == 'l' || platform[2] == 'b')) {
|
||||
+ architecture = platform[1] - '0';
|
||||
+ }
|
||||
+ }
|
||||
+ if ((hwcap & HWCAP_VFPv3) != 0)
|
||||
+ result |= kCPUFeatureVFPv3;
|
||||
+ if ((hwcap & HWCAP_NEON) != 0)
|
||||
+ result |= kCPUFeatureNEON;
|
||||
+#endif
|
||||
+ if (architecture >= 7)
|
||||
+ result |= kCPUFeatureARMv7;
|
||||
+ if (architecture >= 6)
|
||||
+ result |= kCPUFeatureLDREXSTREX;
|
||||
+ return result;
|
||||
+}
|
||||
+#endif // WEBRTC_ARCH_ARM_FAMILY
|
||||
diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp
|
||||
--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2016-11-07 15:46:18.000000000 +0100
|
||||
+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2016-12-04 15:09:09.323684522 +0100
|
||||
@@ -143,6 +143,9 @@
|
||||
# Define this if the Linux system does not support CLOCK_MONOTONIC.
|
||||
#'WEBRTC_CLOCK_TYPE_REALTIME',
|
||||
],
|
||||
+ 'dependencies': [
|
||||
+ 'cpu_features_webrtc.gyp:cpu_features_linux',
|
||||
+ ],
|
||||
'link_settings': {
|
||||
'libraries': [ '-lrt', ],
|
||||
},
|
Loading…
Reference in New Issue