From 12ea469918bcb73605b9c1e5080351f1189c0f17 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Sep 2019 13:21:23 -0700 Subject: qttools: Add CONFIG+=config_clang_done when not building with clang This ensures that dev packages from clang are not looked into during configure Define YOCTO_ALTERNATE_EXE_PATH pointing into target sysroot so that llvm-config can find the target libclang instead of native one Fixes linking ../../bin/qdoc TMPDIR/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/qttools/5.13.0+gitAUTOINC+cc9250477e-r0/recipe-sysroot-native/usr/lib/libclang.so: file not recognized: file format not recognized clang-9: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [Makefile:212: ../../bin/qdoc] Error 1 Signed-off-by: Khem Raj --- recipes-qt/qt5/qttools_git.bb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes-qt/qt5/qttools_git.bb b/recipes-qt/qt5/qttools_git.bb index e9530385..ba0957ac 100644 --- a/recipes-qt/qt5/qttools_git.bb +++ b/recipes-qt/qt5/qttools_git.bb @@ -30,13 +30,15 @@ PACKAGECONFIG_append_toolchain-clang = " clang" PACKAGECONFIG[qtwebkit] = ",,qtwebkit" PACKAGECONFIG[clang] = ",,clang" +export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_BINDIR}/llvm-config" + EXTRA_QMAKEVARS_PRE += " \ ${@bb.utils.contains('PACKAGECONFIG', 'qtwebkit', '', 'CONFIG+=noqtwebkit', d)} \ " -EXTRA_QMAKEVARS_PRE_append_class-native = " CONFIG-=config_clang" -EXTRA_QMAKEVARS_PRE_append_class-nativesdk = " CONFIG-=config_clang" +EXTRA_QMAKEVARS_PRE_append_class-native = " CONFIG+=config_clang_done CONFIG-=config_clang" +EXTRA_QMAKEVARS_PRE_append_class-nativesdk = " CONFIG+=config_clang_done CONFIG-=config_clang" EXTRA_QMAKEVARS_PRE_append_class-target = "\ - ${@bb.utils.contains('PACKAGECONFIG', 'clang', 'CONFIG+=config_clang', 'CONFIG-=config_clang', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'clang', 'CONFIG+=config_clang', 'CONFIG+=config_clang_done CONFIG-=config_clang', d)} \ " SRCREV = "cc9250477eaa71a3f3ffd050591d4a9d835288ca" -- cgit v1.2.3-54-g00ecf