summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2020-08-16 19:10:11 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2020-11-03 17:01:34 +0100
commite3e3b3771bc597ca91f33c5eafc17a2dc3802c13 (patch)
tree1cc0021e22751073011c6e14a4e81ae45c8fdca0
parent81516e098cbabd91a1c76767012ca1e44fe4c0ce (diff)
downloadmeta-qt5-e3e3b3771bc597ca91f33c5eafc17a2dc3802c13.tar.gz
qt5-creator: Make clang a PACKAGECONFIG - enabled for clang toolchain
Test case: * meta-clang in layers * gcc toolchain * build qttools with PACKAGECONFIG[clang] enabled to get (native) help tools. After setting clang PACKAGECONFIG at qttools, qt5-creator builds failed due to linker errors: Linker tried to link against native clang tools. Avoid that in the same way as clang-toolchain did but use PACKAGECONFIG. * clang-toolchain builds remain unchanged * a hint was dropped in the recipe to support users failing for same issue Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> (cherry picked from commit 063714fb78cf5264ac52541c1c4c364620f8df28)
-rw-r--r--recipes-qt/qt5/qt5-creator_git.bb18
1 files changed, 12 insertions, 6 deletions
diff --git a/recipes-qt/qt5/qt5-creator_git.bb b/recipes-qt/qt5/qt5-creator_git.bb
index 0dd9c234..39f202d6 100644
--- a/recipes-qt/qt5/qt5-creator_git.bb
+++ b/recipes-qt/qt5/qt5-creator_git.bb
@@ -15,7 +15,6 @@ LIC_FILES_CHKSUM = " \
15inherit qmake5 mime-xdg 15inherit qmake5 mime-xdg
16 16
17DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native zlib" 17DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native zlib"
18DEPENDS_append_toolchain-clang = " clang llvm-common"
19DEPENDS_append_libc-musl = " libexecinfo" 18DEPENDS_append_libc-musl = " libexecinfo"
20 19
21SRCREV = "501e7c2fddec6b93e273dadcac389cd8c934cf00" 20SRCREV = "501e7c2fddec6b93e273dadcac389cd8c934cf00"
@@ -34,6 +33,13 @@ EXTRA_QMAKEVARS_PRE += "IDE_LIBRARY_BASENAME=${baselib}${QT_DIR_NAME}"
34 33
35EXTRANATIVEPATH += "chrpath-native" 34EXTRANATIVEPATH += "chrpath-native"
36 35
36PACKAGECONFIG ??= ""
37PACKAGECONFIG_append_toolchain-clang = " clang"
38
39# Important note: In case clang was added to qttools' PACKAGECONFIG, it has to
40# be added here too - otherwise build fails trying to link native clang libraries
41PACKAGECONFIG[clang] = ",,clang llvm-common"
42
37COMPATIBLE_HOST_toolchain-clang_riscv32 = "null" 43COMPATIBLE_HOST_toolchain-clang_riscv32 = "null"
38COMPATIBLE_HOST_toolchain-clang_riscv64 = "null" 44COMPATIBLE_HOST_toolchain-clang_riscv64 = "null"
39 45
@@ -50,11 +56,11 @@ do_configure_append() {
50 56
51do_install() { 57do_install() {
52 oe_runmake install INSTALL_ROOT=${D}${prefix} 58 oe_runmake install INSTALL_ROOT=${D}${prefix}
53} 59 if [ "${@bb.utils.contains("PACKAGECONFIG", "clang", "1", "0", d)}" = "1" ]; then
54do_install_append_toolchain-clang () { 60 # Remove RPATHs embedded in bins
55 # Remove RPATHs embedded in bins 61 chrpath --delete ${D}${libdir}/qtcreator/plugins/libClang*
56 chrpath --delete ${D}${libdir}/qtcreator/plugins/libClang* 62 chrpath --delete ${D}${libexecdir}/qtcreator/clang*
57 chrpath --delete ${D}${libexecdir}/qtcreator/clang* 63 fi
58} 64}
59 65
60FILES_${PN} += " \ 66FILES_${PN} += " \