[OE-core] [PATCH 1/3] cmake.bbclass: fix wrong toolchain flags of nativesdk package

kai.kang at windriver.com kai.kang at windriver.com
Tue Aug 21 06:36:05 UTC 2018


From: Kai Kang <kai.kang at windriver.com>

When enable multilib in an existing build project, if already build a
nativesdk package which inherits cmake, rebuild it will cause configure
error when test compiler:

| .../libexec/x86_64-pokysdk-linux/gcc/x86_64-pokysdk-linux/8.2.0/ld:
| cannot find crt1.o: No such file or directory

The STAGING_DIR_TARGET is different when multilib is enabled and
disabled. And it is a component of compiler option '--sysroot'. The
values are stored in file ${WORKDIR}/toolchain.cmake which is generated
by task generate_toolchain_file. But the task doesn't be re-run with
multilib status change.

Add ${STAGING_DIR_TARGET} to var flag 'vardeps' of generate_toolchain_file
to make sure file toolchain.cmake is re-gerated when toggle multilib.

Signed-off-by: Kai Kang <kai.kang at windriver.com>
---
 meta/classes/cmake.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index fd40a9863e..bb63414b77 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -112,6 +112,7 @@ EOF
 }
 
 addtask generate_toolchain_file after do_patch before do_configure
+do_generate_toolchain_file[vardeps] += "${STAGING_DIR_TARGET}"
 
 CONFIGURE_FILES = "CMakeLists.txt"
 
-- 
2.18.0




More information about the Openembedded-core mailing list