aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch')
-rw-r--r--recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch b/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch
new file mode 100644
index 00000000..21fe4f0b
--- /dev/null
+++ b/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch
@@ -0,0 +1,40 @@
+From 9e1036a25207f9013a13b23401feacd72866be4c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Feb 2022 18:15:28 -0800
+Subject: [PATCH] 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
+
+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 <raj.khem@gmail.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/buildtools/gn.pro | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro
+index 9632f0ef7..5ff50cca1 100644
+--- a/src/buildtools/gn.pro
++++ b/src/buildtools/gn.pro
+@@ -20,8 +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)\" \
+- --no-static-libstdc++
++ --ld \"$$which($$CXX_host) -stdlib=libc++ -rtlib=libgcc -unwindlib=libgcc $$(GN_HOST_TOOLCHAIN_EXTRA_LDFLAGS)\" --ar \"$$which(ar)\"
+
+ msvc:!clang_cl: gn_gen_args += --use-lto
+