diff options
author | Andreas Müller <schnitzeltony@gmail.com> | 2020-08-16 19:10:11 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2020-11-03 17:01:34 +0100 |
commit | e3e3b3771bc597ca91f33c5eafc17a2dc3802c13 (patch) | |
tree | 1cc0021e22751073011c6e14a4e81ae45c8fdca0 | |
parent | 81516e098cbabd91a1c76767012ca1e44fe4c0ce (diff) | |
download | meta-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.bb | 18 |
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 = " \ | |||
15 | inherit qmake5 mime-xdg | 15 | inherit qmake5 mime-xdg |
16 | 16 | ||
17 | DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native zlib" | 17 | DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native zlib" |
18 | DEPENDS_append_toolchain-clang = " clang llvm-common" | ||
19 | DEPENDS_append_libc-musl = " libexecinfo" | 18 | DEPENDS_append_libc-musl = " libexecinfo" |
20 | 19 | ||
21 | SRCREV = "501e7c2fddec6b93e273dadcac389cd8c934cf00" | 20 | SRCREV = "501e7c2fddec6b93e273dadcac389cd8c934cf00" |
@@ -34,6 +33,13 @@ EXTRA_QMAKEVARS_PRE += "IDE_LIBRARY_BASENAME=${baselib}${QT_DIR_NAME}" | |||
34 | 33 | ||
35 | EXTRANATIVEPATH += "chrpath-native" | 34 | EXTRANATIVEPATH += "chrpath-native" |
36 | 35 | ||
36 | PACKAGECONFIG ??= "" | ||
37 | PACKAGECONFIG_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 | ||
41 | PACKAGECONFIG[clang] = ",,clang llvm-common" | ||
42 | |||
37 | COMPATIBLE_HOST_toolchain-clang_riscv32 = "null" | 43 | COMPATIBLE_HOST_toolchain-clang_riscv32 = "null" |
38 | COMPATIBLE_HOST_toolchain-clang_riscv64 = "null" | 44 | COMPATIBLE_HOST_toolchain-clang_riscv64 = "null" |
39 | 45 | ||
@@ -50,11 +56,11 @@ do_configure_append() { | |||
50 | 56 | ||
51 | do_install() { | 57 | do_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 |
54 | do_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 | ||
60 | FILES_${PN} += " \ | 66 | FILES_${PN} += " \ |