From 88c7940a31919bb293531853dca4404509d3e691 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 22 Jan 2024 19:38:02 -0800 Subject: [PATCH] qtwebengine: Remove setting --target option with yocto This option is not needed to be set with OE when using clang because OE passes correct tuple which is recognised by OE based distros correctly. Otherwise search paths for C runtime files goes awry and we get cryptic linking failures like ld.lld: error: cannot open crtbeginS.o: No such file or directory ld.lld: error: cannot open crtendS.o: No such file or directory aarch64-yoe-linux-clang++: error: linker command failed with exit code 1 (use -v to see invocation) Pick-to: 6.7 Change-Id: Id445fb44adc3b9603109fe4763bd6344370cffff Reviewed-by: Mikko Gronoff --- recipes-qt/qt6/qtwebengine.inc | 1 + ...ttings-done-for-clang-that-conflict-.patch | 87 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 recipes-qt/qt6/qtwebengine/chromium/0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch diff --git a/recipes-qt/qt6/qtwebengine.inc b/recipes-qt/qt6/qtwebengine.inc index 3740ca4..dca64c2 100644 --- a/recipes-qt/qt6/qtwebengine.inc +++ b/recipes-qt/qt6/qtwebengine.inc @@ -35,5 +35,6 @@ SRC_URI += " \ SRC_URI += " \ file://chromium/0001-v8-qemu-wrapper.patch;patchdir=src/3rdparty \ + file://chromium/0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch;patchdir=src/3rdparty \ " SRCREV_FORMAT = "qtwebengine_qtwebengine-chromium" diff --git a/recipes-qt/qt6/qtwebengine/chromium/0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch b/recipes-qt/qt6/qtwebengine/chromium/0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch new file mode 100644 index 0000000..7339c34 --- /dev/null +++ b/recipes-qt/qt6/qtwebengine/chromium/0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch @@ -0,0 +1,87 @@ +From 7eb6877c15ab9d73c9a7cf3a8a17a1a23f7396f9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 29 Apr 2019 12:00:19 +0300 +Subject: [PATCH] Remove the GN settings done for clang that conflict with OE + +clang cross compiler that is build with meta-clang has lot of these +settings built-in and specifying them here confuses the compiler + +--target option and -no-canonical-prefixes options result in clang + +finding the headers in target sysroot + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +Rebased-by: Maksim Sisov +Rebased-by: Randy MacLeod + +--- + build/config/compiler/BUILD.gn | 38 ---------------------------------- + 1 file changed, 38 deletions(-) + +--- a/chromium/build/config/compiler/BUILD.gn ++++ b/chromium/build/config/compiler/BUILD.gn +@@ -1065,11 +1065,6 @@ config("compiler_cpu_abi") { + ] + } + } else if (current_cpu == "arm") { +- if (is_clang && !is_android && !is_nacl && +- !(is_chromeos_lacros && is_chromeos_device)) { +- cflags += [ "--target=arm-linux-gnueabihf" ] +- ldflags += [ "--target=arm-linux-gnueabihf" ] +- } + if (!is_nacl) { + cflags += ["-mfloat-abi=$arm_float_abi"] + if (arm_arch != "") { +@@ -1082,12 +1077,6 @@ config("compiler_cpu_abi") { + if (arm_tune != "") { + cflags += [ "-mtune=$arm_tune" ] + } +- } else if (current_cpu == "arm64") { +- if (is_clang && !is_android && !is_nacl && !is_fuchsia && +- !(is_chromeos_lacros && is_chromeos_device)) { +- cflags += [ "--target=aarch64-linux-gnu" ] +- ldflags += [ "--target=aarch64-linux-gnu" ] +- } + } else if (current_cpu == "mipsel" && !is_nacl) { + ldflags += [ "-Wl,--hash-style=sysv" ] + if (custom_toolchain == "") { +@@ -1095,9 +1084,6 @@ config("compiler_cpu_abi") { + if (is_android) { + cflags += [ "--target=mipsel-linux-android" ] + ldflags += [ "--target=mipsel-linux-android" ] +- } else { +- cflags += [ "--target=mipsel-linux-gnu" ] +- ldflags += [ "--target=mipsel-linux-gnu" ] + } + } else { + cflags += [ "-EL" ] +@@ -1177,8 +1163,6 @@ config("compiler_cpu_abi") { + ldflags += [ "-Wl,--hash-style=sysv" ] + if (custom_toolchain == "") { + if (is_clang) { +- cflags += [ "--target=mips-linux-gnu" ] +- ldflags += [ "--target=mips-linux-gnu" ] + } else { + cflags += [ "-EB" ] + ldflags += [ "-EB" ] +@@ -1226,9 +1210,6 @@ config("compiler_cpu_abi") { + if (is_android) { + cflags += [ "--target=mips64el-linux-android" ] + ldflags += [ "--target=mips64el-linux-android" ] +- } else { +- cflags += [ "--target=mips64el-linux-gnuabi64" ] +- ldflags += [ "--target=mips64el-linux-gnuabi64" ] + } + } else { + cflags += [ +@@ -1286,8 +1267,6 @@ config("compiler_cpu_abi") { + ldflags += [ "-Wl,--hash-style=sysv" ] + if (custom_toolchain == "") { + if (is_clang) { +- cflags += [ "--target=mips64-linux-gnuabi64" ] +- ldflags += [ "--target=mips64-linux-gnuabi64" ] + } else { + cflags += [ + "-EB",