From 06647dd2a2ddb6e7f7f95747f584f8bc0e8d658d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 26 Feb 2022 18:15:28 -0800 Subject: qtpdf: Fix build with clang use GNU runtime when building native tools like gn when using native clang compiler Fixes | FAILED: gn | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/qtpdf/5.15.8+gitAUTOINC+73e76f9e86_48a205f9e0-r0/recipe-sysroot-native/usr/bin/clang++ -O3 -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-stri p-all -Wl,--as-needed -pthread -o gn -Wl,--start-group tools/gn/gn_main.o base.a gn_lib.a -Wl,--end-group -ldl | /mnt/b/yoe/master/build/tmp/hosttools/ld: cannot find /usr/lib/clang/14.0.0/lib/linux/libclang_rt.builtins-x86_64.a: No such file or directory Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- recipes-qt/qt5/qtpdf/native-clang.patch | 19 +++++++++++++++++++ recipes-qt/qt5/qtpdf_git.bb | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 recipes-qt/qt5/qtpdf/native-clang.patch diff --git a/recipes-qt/qt5/qtpdf/native-clang.patch b/recipes-qt/qt5/qtpdf/native-clang.patch new file mode 100644 index 00000000..5ef534ca --- /dev/null +++ b/recipes-qt/qt5/qtpdf/native-clang.patch @@ -0,0 +1,19 @@ +Fix building with clang from meta-clang + +Clang defaults to llvm runtime and this patch is needed +for building the host tools, since its using native runtime + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj + +--- a/src/buildtools/gn.pro ++++ b/src/buildtools/gn.pro +@@ -20,7 +20,7 @@ build_pass|!debug_and_release { + + gn_gen_args = --no-last-commit-position --out-path $$out_path \ + --cc \"$$which($$CC_host)\" --cxx \"$$which($$CXX_host)\" \ +- --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" \ ++ --ld \"$$which($$CXX_host) -rtlib=libgcc -unwindlib=libgcc\" --ar \"$$which(ar)\" \ + --no-static-libstdc++ + + msvc:!clang_cl: gn_gen_args += --use-lto diff --git a/recipes-qt/qt5/qtpdf_git.bb b/recipes-qt/qt5/qtpdf_git.bb index f0b4b406..eddd934f 100644 --- a/recipes-qt/qt5/qtpdf_git.bb +++ b/recipes-qt/qt5/qtpdf_git.bb @@ -151,6 +151,8 @@ SRC_URI:append:libc-musl = "\ file://0005-mkspecs-Allow-builds-with-libc-glibc.patch \ " +SRC_URI:append:runtime-llvm = " file://native-clang.patch " + SRCREV_qtwebengine = "73e76f9e86b3fded45be6b232bdebe75e7136e4a" SRCREV_chromium = "48a205f9e054b5cc3e67df2e25382da9460c0015" SRCREV = "${SRCREV_qtwebengine}" -- cgit v1.2.3