diff mbox series

[1/1] configs/raspberrypi3_qt5we: remove proprietary-codecs

Message ID 20250430033319.87555-1-gael.portay+rtone@gmail.com
State New
Headers show
Series [1/1] configs/raspberrypi3_qt5we: remove proprietary-codecs | expand

Commit Message

Gaël PORTAY April 30, 2025, 3:33 a.m. UTC
qtwebengine-chromium packages the chromium sources and its third-parties
for Qt. The bundled ffmpeg does not reconfigure the project, but it
embbeds the three hardcoded configurations[1] instead:
 - Chromium if is_chrome_branded is unset
 - Chrome if is_chrome_branded is set (or if is_chromecast is set and if
   is_android is set)
 - ChromeOS if is_chrome_branded is set and if is_chromeos (or if
   is_chromecast is set and if is_android is unset)

For various architectures, including the three ARM architectures below:
 - arm[2] (i.e. armv6 or armv7 without neon)
 - arm-neon[3] if current_cpu == "arm" && arm_version >= 7 && arm_use_neon
   (i.e. armv7 with neon or armv8 32-bit)
 - arm64[2] (i.e. armv8 64-bit)

And, for various operating systems, including the two Linux systems:
 - linux if current_os == linux[4] (or if (is_chromeos ||
   is_fuchsia)[5])
 - linux-noasm[6] if is_linux is set (or is_chromeos is set) and if
   is_msan is set

According the to the compiler option below:

	-I../../3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/arm

The raspberrypi3_qt5we_defconfig ends in the following configuration[7]:
 - Chrome (because of proprietary_codecs is set)
 - linux
 - arm (while it should be arm-neon for Cortex-A53, i.e. armv7-a+neon-vfpv4)

Additionally, according to the compiler options below:

	-march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=vfpv3-d16

The chromium is left unconfigured as the architecture values[8] above
are the default values[9] for armv7:
 - -march=armv7-a[10]
 - -mfloat-abi=hard[11]
 - -mtune=generic-armv7-a[12]
 - -mfpu=vfpv3-d16[13]

qtwebengine configures chromium via qtwebengine-chromium thanks to gn.
The arm options are set by linux.pri[14] and they are read from the CC
and CFLAGS[15][16] set in $$QMAKE_CC $$QMAKE_CFLAGS by qtbase as in:
 - mkspecs/devices/linux-rasp-pi3-g++/qmake.conf[17] (if using broadcom
   graphic stack from rpi-userland)
 - mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf[18] (if using VC4
   driver from mesa3d)

This implies to append these ARM flags to $${BR_COMPILER_CFLAGS} (and
$${BR_COMPILER_CXXFLAGS}) while configuring qt5base to setup chromium
correctly.

Since this has strong implications in the qmake package infrastructure,
this disables the proprietary-codecs in the defconfig in the meanwhile
the chromium is configured correctly from qt5base (at least for ARM).

Note: Add the compiler option -mthumb to the command-line fixes the
assembler issue.

Fixes:

	>>> qt5webengine 5.15.14 Configuring
	(...)
	WARNING: Thumb instruction set is required to build ffmpeg for QtWebEngine.
	(...)
	>>> qt5webengine 5.15.14 Building
	(...)
	[4181/23445] CC obj/third_party/ffmpeg/ffmpeg_internal/vp8.o
	FAILED: obj/third_party/ffmpeg/ffmpeg_internal/vp8.o
	/home/gportay/src/buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-gcc -MMD -MF obj/third_party/ffmpeg/ffmpeg_internal/vp8.o.d -DHAVE_AV_CONFIG_H -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DFFMPEG_CONFIGURATION=NULL -DCHROMIUM_NO_LOGGING -D_ISOC99_SOURCE -D_LARGEFILE_SOURCE -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DCR_SYSROOT_HASH=c2e54f675b83a61301dcdb22e8e7a2b85c01d58c -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/arm -I../../3rdparty/chromium/third_party/ffmpeg -I../../3rdparty/chromium/third_party/ffmpeg/compat/atomics/gcc -Igen -I../../3rdparty/chromium -Igen -fPIC -Wno-deprecated-declarations -fomit-frame-pointer -w -std=c99 -pthread -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=vfpv3-d16 -marm -g0 -fvisibility=hidden -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -I/home/gportay/src/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/opus -std=gnu11 --sysroot=/home/gportay/src/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot -c ../../3rdparty/chromium/third_party/ffmpeg/libavcodec/vp8.c -o obj/third_party/ffmpeg/ffmpeg_internal/vp8.o
	{standard input}: Assembler messages:
	{standard input}:1119: Error: bad instruction `ldrhcs r0,[ip],#2'
	{standard input}:1156: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:1190: Error: bad instruction `ldrhcs lr,[ip],#2'
	{standard input}:1253: Error: bad instruction `ldrhcs r9,[r7],#2'
	{standard input}:1284: Error: bad instruction `ldrhcs r7,[ip],#2'
	{standard input}:1319: Error: bad instruction `ldrhcs fp,[ip],#2'
	{standard input}:1354: Error: bad instruction `ldrhcs r0,[ip],#2'
	{standard input}:1405: Error: bad instruction `ldrhcs r1,[ip],#2'
	{standard input}:1458: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:1504: Error: bad instruction `ldrhcs r5,[ip],#2'
	{standard input}:1542: Error: bad instruction `ldrhcs r7,[ip],#2'
	{standard input}:1798: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:1842: Error: bad instruction `ldrhcs r7,[r1],#2'
	{standard input}:1882: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:1925: Error: bad instruction `ldrhcs r7,[r1],#2'
	{standard input}:1965: Error: bad instruction `ldrhcs r5,[r1],#2'
	{standard input}:2016: Error: bad instruction `ldrhcs r7,[r0],#2'
	{standard input}:2124: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:2163: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:2203: Error: bad instruction `ldrhcs r5,[r1],#2'
	{standard input}:2250: Error: bad instruction `ldrhcs r4,[r1],#2'
	{standard input}:2298: Error: bad instruction `ldrhcs r4,[r1],#2'
	{standard input}:2344: Error: bad instruction `ldrhcs r4,[r0],#2'
	{standard input}:2381: Error: bad instruction `ldrhcs r6,[r0],#2'
	{standard input}:2434: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:2623: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:2665: Error: bad instruction `ldrhcs r7,[r3],#2'
	{standard input}:2710: Error: bad instruction `ldrhcs r8,[r2],#2'
	{standard input}:2753: Error: bad instruction `ldrhcs r6,[r3],#2'
	{standard input}:2798: Error: bad instruction `ldrhcs r6,[r3],#2'
	{standard input}:2841: Error: bad instruction `ldrhcs r8,[r0],#2'
	{standard input}:2884: Error: bad instruction `ldrhcs r6,[ip],#2'
	{standard input}:2929: Error: bad instruction `ldrhcs r6,[ip],#2'
	{standard input}:2973: Error: bad instruction `ldrhcs r7,[r0],#2'
	{standard input}:3014: Error: bad instruction `ldrhcs r6,[ip],#2'
	{standard input}:3056: Error: bad instruction `ldrhcs r6,[ip],#2'
	{standard input}:3101: Error: bad instruction `ldrhcs r6,[r0],#2'
	{standard input}:3142: Error: bad instruction `ldrhcs r6,[ip],#2'
	{standard input}:3184: Error: bad instruction `ldrhcs r5,[r1],#2'
	{standard input}:3230: Error: bad instruction `ldrhcs r4,[r1],#2'
	{standard input}:3271: Error: bad instruction `ldrhcs r5,[r2],#2'
	{standard input}:3412: Error: bad instruction `ldrhcs r5,[r3],#2'
	{standard input}:3509: Error: bad instruction `ldrhcs r4,[r5],#2'
	{standard input}:3559: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:3655: Error: bad instruction `ldrhcs r5,[ip],#2'
	{standard input}:3753: Error: bad instruction `ldrhcs r7,[r0],#2'
	{standard input}:3829: Error: bad instruction `ldrhcs r5,[r3],#2'
	{standard input}:3882: Error: bad instruction `ldrhcs r4,[r0],#2'
	{standard input}:3919: Error: bad instruction `ldrhcs r2,[ip],#2'
	{standard input}:3965: Error: bad instruction `ldrhcs r8,[ip],#2'
	{standard input}:4020: Error: bad instruction `ldrhcs r5,[r3],#2'
	{standard input}:4056: Error: bad instruction `ldrhcs r5,[r3],#2'
	{standard input}:4098: Error: bad instruction `ldrhcs r7,[r0],#2'
	{standard input}:4150: Error: bad instruction `ldrhcs r7,[r0],#2'
	{standard input}:4201: Error: bad instruction `ldrhcs r7,[r2],#2'
	{standard input}:4246: Error: bad instruction `ldrhcs r7,[r1],#2'
	{standard input}:4291: Error: bad instruction `ldrhcs r7,[r0],#2'
	{standard input}:4333: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:4381: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:4426: Error: bad instruction `ldrhcs r5,[r2],#2'
	{standard input}:4472: Error: bad instruction `ldrhcs r9,[r1],#2'
	{standard input}:4543: Error: bad instruction `ldrhcs r2,[ip],#2'
	{standard input}:4587: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:4652: Error: bad instruction `ldrhcs r7,[r1],#2'
	{standard input}:4737: Error: bad instruction `ldrhcs lr,[r1],#2'
	{standard input}:4779: Error: bad instruction `ldrhcs r5,[r1],#2'
	{standard input}:4826: Error: bad instruction `ldrhcs lr,[r1],#2'
	{standard input}:4868: Error: bad instruction `ldrhcs r5,[r1],#2'
	{standard input}:5565: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:5636: Error: bad instruction `ldrhcs r9,[r1],#2'
	{standard input}:5726: Error: bad instruction `ldrhcs r3,[r1],#2'
	{standard input}:5766: Error: bad instruction `ldrhcs r8,[r2],#2'
	{standard input}:5805: Error: bad instruction `ldrhcs r3,[r1],#2'
	{standard input}:5849: Error: bad instruction `ldrhcs r5,[r3],#2'
	{standard input}:5889: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:5943: Error: bad instruction `ldrhcs r9,[r1],#2'
	{standard input}:6035: Error: bad instruction `ldrhcs r7,[r2],#2'
	{standard input}:6127: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:6165: Error: bad instruction `ldrhcs r0,[r2],#2'
	{standard input}:6309: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:6373: Error: bad instruction `ldrhcs r8,[r1],#2'
	{standard input}:6482: Error: bad instruction `ldrhcs r2,[r1],#2'
	{standard input}:6588: Error: bad instruction `ldrhcs r1,[r2],#2'
	{standard input}:6728: Error: bad instruction `ldrhcs r0,[r2],#2'
	{standard input}:6806: Error: bad instruction `ldrhcs r3,[r1],#2'
	{standard input}:6941: Error: bad instruction `ldrhcs r2,[r4],#2'
	{standard input}:6978: Error: bad instruction `ldrhcs r2,[r5],#2'
	{standard input}:7035: Error: bad instruction `ldrhcs r5,[lr],#2'
	{standard input}:7086: Error: bad instruction `ldrhcs r0,[r2],#2'
	{standard input}:7140: Error: bad instruction `ldrhcs r7,[r4],#2'
	{standard input}:7174: Error: bad instruction `ldrhcs r8,[lr],#2'
	{standard input}:7216: Error: bad instruction `ldrhcs r5,[ip],#2'
	{standard input}:7258: Error: bad instruction `ldrhcs r3,[r5],#2'
	{standard input}:7305: Error: bad instruction `ldrhcs r7,[r4],#2'
	{standard input}:7341: Error: bad instruction `ldrhcs r8,[lr],#2'
	{standard input}:7383: Error: bad instruction `ldrhcs r5,[ip],#2'
	{standard input}:7425: Error: bad instruction `ldrhcs r3,[r5],#2'
	{standard input}:7482: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:7550: Error: bad instruction `ldrhcs r8,[ip],#2'
	{standard input}:7611: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:7667: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:7715: Error: bad instruction `ldrhcs r8,[ip],#2'
	{standard input}:7759: Error: bad instruction `ldrhcs r8,[ip],#2'
	{standard input}:7820: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:7876: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:7924: Error: bad instruction `ldrhcs r8,[ip],#2'
	{standard input}:8287: Error: bad instruction `ldrhcs r5,[r1],#2'
	{standard input}:8360: Error: bad instruction `ldrhcs fp,[r1],#2'
	{standard input}:11607: Error: bad instruction `ldrhcs fp,[lr],#2'
	{standard input}:11719: Error: bad instruction `ldrhcs fp,[ip],#2'
	{standard input}:12085: Error: bad instruction `ldrhcs r2,[ip],#2'
	{standard input}:12130: Error: bad instruction `ldrhcs r8,[r0],#2'
	{standard input}:12169: Error: bad instruction `ldrhcs r1,[ip],#2'
	{standard input}:12214: Error: bad instruction `ldrhcs r6,[r2],#2'
	{standard input}:12260: Error: bad instruction `ldrhcs fp,[r1],#2'
	{standard input}:12316: Error: bad instruction `ldrhcs fp,[r0],#2'
	{standard input}:12671: Error: bad instruction `ldrhcs r9,[r4],#2'
	{standard input}:12762: Error: bad instruction `ldrhcs r9,[r2],#2'
	{standard input}:13010: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:13143: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:13704: Error: bad instruction `ldrhcs fp,[r1],#2'
	{standard input}:14282: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:14365: Error: bad instruction `ldrhcs r2,[r0],#2'
	{standard input}:14531: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:14672: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:14745: Error: bad instruction `ldrhcs r1,[r0],#2'
	{standard input}:14874: Error: bad instruction `ldrhcs r1,[r4],#2'
	{standard input}:14914: Error: bad instruction `ldrhcs r1,[r5],#2'
	{standard input}:14954: Error: bad instruction `ldrhcs r5,[ip],#2'
	{standard input}:15017: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:15052: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:15096: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:15138: Error: bad instruction `ldrhcs r0,[ip],#2'
	{standard input}:15182: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:15217: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:15261: Error: bad instruction `ldrhcs r5,[r0],#2'
	{standard input}:15303: Error: bad instruction `ldrhcs r0,[ip],#2'
	{standard input}:15354: Error: bad instruction `ldrhcs r0,[r2],#2'
	{standard input}:15408: Error: bad instruction `ldrhcs fp,[r1],#2'
	{standard input}:15490: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:15540: Error: bad instruction `ldrhcs ip,[r1],#2'
	{standard input}:15610: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:15657: Error: bad instruction `ldrhcs fp,[r1],#2'
	{standard input}:15703: Error: bad instruction `ldrhcs fp,[r1],#2'
	{standard input}:15770: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:15828: Error: bad instruction `ldrhcs r9,[ip],#2'
	{standard input}:15875: Error: bad instruction `ldrhcs fp,[r1],#2'
	[4189/23445] ACTION //third_party/devtools-frontend/src/front_end/ui:ui-typescript(/home/gportay/src/buildroot/output/build/qt5webengine-5.15.14/src/toolchain:target)
	ninja: build stopped: subcommand failed.

[1]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/third_party/ffmpeg/ffmpeg_options.gni#L10-L28
[2]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/third_party/ffmpeg/ffmpeg_options.gni#L65
[3]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/third_party/ffmpeg/ffmpeg_options.gni#L62-L63
[4]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/third_party/ffmpeg/ffmpeg_options.gni#L68
[5]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/third_party/ffmpeg/ffmpeg_options.gni#L71-L72
[6]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/third_party/ffmpeg/ffmpeg_options.gni#L69-L70
[7]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h
[8]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/build/config/arm.gni#L12-L44
[9]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/build/config/arm.gni#L73-L98
[10]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/build/config/arm.gni#L75
[11]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/build/config/arm.gni#L88
[12]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/build/config/arm.gni#L78
[13]: https://github.com/qt/qtwebengine-chromium/blob/18c9261dc5b8aa57a0bdd5b62ce6f648cca1ef5e/chromium/build/config/arm.gni#L96
[14]: https://github.com/qt/qtwebengine/blob/v5.15.14-lts/src/buildtools/config/linux.pri#L54-L99
[15]: https://github.com/qt/qtwebengine/blob/v5.15.14-lts/src/buildtools/config/linux.pri#L4-L6
[16]: https://github.com/qt/qtwebengine/blob/v5.15.14-lts/src/buildtools/config/functions.pri#L1-L8
[17]: https://github.com/qt/qtbase/blob/v5.15.14-lts-lgpl/mkspecs/devices/linux-rasp-pi3-g%2B%2B/qmake.conf#L38-L39
[18]: https://github.com/qt/qtbase/blob/v5.15.14-lts-lgpl/mkspecs/devices/linux-rasp-pi3-vc4-g%2B%2B/qmake.conf#L34-L35

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
 configs/raspberrypi3_qt5we_defconfig | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/configs/raspberrypi3_qt5we_defconfig b/configs/raspberrypi3_qt5we_defconfig
index dc8160711d..28199b4b9a 100644
--- a/configs/raspberrypi3_qt5we_defconfig
+++ b/configs/raspberrypi3_qt5we_defconfig
@@ -24,7 +24,6 @@  BR2_PACKAGE_QT5=y
 BR2_PACKAGE_QT5BASE_EXAMPLES=y
 BR2_PACKAGE_QT5BASE_GIF=y
 BR2_PACKAGE_QT5WEBENGINE=y
-BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=y
 BR2_PACKAGE_RPI_FIRMWARE=y
 BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y
 BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y