diff options
author | Andreas Müller <schnitzeltony@gmail.com> | 2020-08-16 19:10:11 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2020-09-02 15:16:33 +0200 |
commit | 063714fb78cf5264ac52541c1c4c364620f8df28 (patch) | |
tree | 3e2ddeb4894683c522aae178b4770b9ab5c5b137 | |
parent | f30c4ba364030ad1c92d24c6f5ee3bc7e479dc65 (diff) |
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>
-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 = " \ inherit qmake5 mime-xdg DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native zlib" -DEPENDS_append_toolchain-clang = " clang llvm-common" DEPENDS_append_libc-musl = " libexecinfo" SRCREV = "501e7c2fddec6b93e273dadcac389cd8c934cf00" @@ -34,6 +33,13 @@ EXTRA_QMAKEVARS_PRE += "IDE_LIBRARY_BASENAME=${baselib}${QT_DIR_NAME}" EXTRANATIVEPATH += "chrpath-native" +PACKAGECONFIG ??= "" +PACKAGECONFIG_append_toolchain-clang = " clang" + +# Important note: In case clang was added to qttools' PACKAGECONFIG, it has to +# be added here too - otherwise build fails trying to link native clang libraries +PACKAGECONFIG[clang] = ",,clang llvm-common" + COMPATIBLE_HOST_toolchain-clang_riscv32 = "null" COMPATIBLE_HOST_toolchain-clang_riscv64 = "null" @@ -50,11 +56,11 @@ do_configure_append() { do_install() { oe_runmake install INSTALL_ROOT=${D}${prefix} -} -do_install_append_toolchain-clang () { - # Remove RPATHs embedded in bins - chrpath --delete ${D}${libdir}/qtcreator/plugins/libClang* - chrpath --delete ${D}${libexecdir}/qtcreator/clang* + if [ "${@bb.utils.contains("PACKAGECONFIG", "clang", "1", "0", d)}" = "1" ]; then + # Remove RPATHs embedded in bins + chrpath --delete ${D}${libdir}/qtcreator/plugins/libClang* + chrpath --delete ${D}${libexecdir}/qtcreator/clang* + fi } FILES_${PN} += " \ |